catcrypt: Implement symmetric key-encapsulation and signature schemes.
[u/mdw/catacomb] / key-pack.c
index 0303dbc..fed144a 100644 (file)
@@ -138,7 +138,7 @@ int key_unpack(key_packdef *kp, key_data *kd, dstr *d)
   /* --- Ensure that the key has the right type --- */
 
   if ((kd->e & KF_ENCMASK) != e) {
-    err = KERR_BADTYPE;
+    err = KERR_WRONGTYPE;
     goto fail;
   }