Fix a couple of key import modes in the NSS module, although they don't
authorGreg Hudson <ghudson@mit.edu>
Fri, 11 Mar 2011 04:17:42 +0000 (04:17 +0000)
committerGreg Hudson <ghudson@mit.edu>
Fri, 11 Mar 2011 04:17:42 +0000 (04:17 +0000)
seem to matter a lot.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24698 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/nss/enc_provider/camellia.c
src/lib/crypto/nss/enc_provider/des3.c

index 820071add5152b768b065aca318b854142675c5d..3461bfea726c5140c56fba3cbba71af1ee2eab5d 100644 (file)
@@ -71,7 +71,7 @@ krb5int_camellia_cbc_mac(krb5_key key, const krb5_crypto_iov *data,
 {
     krb5_error_code ret;
 
-    ret = k5_nss_gen_import(key, CKM_CAMELLIA_CBC, CKA_DECRYPT);
+    ret = k5_nss_gen_import(key, CKM_CAMELLIA_CBC, CKA_ENCRYPT);
     if (ret != 0)
         return ret;
     return k5_nss_gen_cbcmac_iov(key, CKM_CAMELLIA_CBC, ivec, data, num_data,
index 5030dde2efdb5ca7e3f19a9d7a40cc3df08d89ef..b57294580769475d0cbe4ea5164b0115e6ab2a0c 100644 (file)
@@ -55,7 +55,7 @@ k5_des3_decrypt_iov(krb5_key key, const krb5_data *ivec,
 {
    krb5_error_code ret;
 
-   ret = k5_nss_gen_import(key, CKM_DES3_CBC, CKA_ENCRYPT);
+   ret = k5_nss_gen_import(key, CKM_DES3_CBC, CKA_DECRYPT);
    if (ret != 0)
        return ret;
    return k5_nss_gen_block_iov(key, CKM_DES3_CBC, CKA_DECRYPT,