]> err.no Git - yubikey-personalization/commitdiff
add not implemented legacy function to import
authorKlas Lindfors <klas@yubico.com>
Fri, 12 Apr 2013 10:20:52 +0000 (12:20 +0200)
committerKlas Lindfors <klas@yubico.com>
Fri, 12 Apr 2013 10:20:52 +0000 (12:20 +0200)
ykpers.c

index d66fcc290ef4d290bb0d4a00566899649b0cd3e4..9957035845eb6bcf28cb391ca9ff7f30ed3fda6f 100644 (file)
--- a/ykpers.c
+++ b/ykpers.c
@@ -1010,8 +1010,11 @@ int ykp_import_config(const char *buf, size_t len, YKP_CONFIG *cfg,
                int format) {
        if(format == YKP_FORMAT_JSON) {
                return ykp_json_import_cfg(buf, len, cfg);
+       } else if(format == YKP_FORMAT_LEGACY) {
+               ykp_errno = YKP_ENOTYETIMPL;
        }
-       return 1;
+       ykp_errno = YKP_EINVAL;
+       return 0;
 }
 int ykp_write_config(const YKP_CONFIG *cfg,
                     int (*writer)(const char *buf, size_t count,