aboutsummaryrefslogtreecommitdiffstats
path: root/sm/misc.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2001-11-13 12:50:14 +0000
committerWerner Koch <[email protected]>2001-11-13 12:50:14 +0000
commit90d060c1997c6c0b9f26c9088020d62f91d450da (patch)
treeb2e7720d625699a49729b36286fb66a774c5faed /sm/misc.c
parentA Makefile is a pretty useful thing (diff)
downloadgnupg-90d060c1997c6c0b9f26c9088020d62f91d450da.tar.gz
gnupg-90d060c1997c6c0b9f26c9088020d62f91d450da.zip
We have reached a state where we are able to import certs and
check the certification path.
Diffstat (limited to 'sm/misc.c')
-rw-r--r--sm/misc.c54
1 files changed, 52 insertions, 2 deletions
diff --git a/sm/misc.c b/sm/misc.c
index c1bc346d1..d3f0aabaf 100644
--- a/sm/misc.c
+++ b/sm/misc.c
@@ -29,13 +29,63 @@
#include <ksba.h>
#include "util.h"
+#include "gpgsm.h"
/* Note: we might want to wrap this in a macro to get our hands on
- the line and file wehre the error occired */
+ the line and file where the error occired */
int
map_ksba_err (int err)
{
- return -1;
+ switch (err)
+ {
+ case -1:
+ case 0:
+ break;
+
+ default:
+ err = GPGSM_General_Error;
+ break;
+ }
+ return err;
}
+
+int
+map_gcry_err (int err)
+{
+ switch (err)
+ {
+ case -1:
+ case 0:
+ break;
+
+ default:
+ err = GPGSM_General_Error;
+ break;
+ }
+ return err;
+}
+
+int
+map_kbx_err (int err)
+{
+ switch (err)
+ {
+ case -1:
+ case 0:
+ break;
+
+ default:
+ err = GPGSM_General_Error;
+ break;
+ }
+ return err;
+}
+
+
+
+
+
+
+