311 static int pk11_digest_final(EVP_MD_CTX *ctx, unsigned char *md); |
311 static int pk11_digest_final(EVP_MD_CTX *ctx, unsigned char *md); |
312 static int pk11_digest_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from); |
312 static int pk11_digest_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from); |
313 static int pk11_digest_cleanup(EVP_MD_CTX *ctx); |
313 static int pk11_digest_cleanup(EVP_MD_CTX *ctx); |
314 |
314 |
315 static int pk11_choose_slots(int *any_slot_found); |
315 static int pk11_choose_slots(int *any_slot_found); |
|
316 static void pk11_choose_rand_slot(CK_TOKEN_INFO token_info, |
|
317 CK_SLOT_ID current_slot); |
|
318 static void pk11_choose_pubkey_slot(CK_MECHANISM_INFO mech_info, |
|
319 CK_TOKEN_INFO token_info, CK_SLOT_ID current_slot, CK_RV rv, |
|
320 int best_number_of_mechs, CK_SLOT_ID best_pubkey_slot_sofar); |
|
321 static void pk11_choose_cipher_digest(int *local_cipher_nids, |
|
322 int *local_digest_nids, CK_FUNCTION_LIST_PTR pflist, |
|
323 CK_SLOT_ID current_slot); |
316 static void pk11_find_symmetric_ciphers(CK_FUNCTION_LIST_PTR pflist, |
324 static void pk11_find_symmetric_ciphers(CK_FUNCTION_LIST_PTR pflist, |
317 CK_SLOT_ID current_slot, int *current_slot_n_cipher, |
325 CK_SLOT_ID current_slot, int *current_slot_n_cipher, |
318 int *local_cipher_nids); |
326 int *local_cipher_nids); |
319 static void pk11_find_digests(CK_FUNCTION_LIST_PTR pflist, |
327 static void pk11_find_digests(CK_FUNCTION_LIST_PTR pflist, |
320 CK_SLOT_ID current_slot, int *current_slot_n_digest, |
328 CK_SLOT_ID current_slot, int *current_slot_n_digest, |
3004 } |
3007 } |
3005 |
3008 |
3006 DEBUG_SLOT_SEL("%s: provider: %s\n", PK11_DBG, def_PK11_LIBNAME); |
3009 DEBUG_SLOT_SEL("%s: provider: %s\n", PK11_DBG, def_PK11_LIBNAME); |
3007 DEBUG_SLOT_SEL("%s: number of slots: %d\n", PK11_DBG, ulSlotCount); |
3010 DEBUG_SLOT_SEL("%s: number of slots: %d\n", PK11_DBG, ulSlotCount); |
3008 |
3011 |
3009 DEBUG_SLOT_SEL("%s: == checking rand slots ==\n", PK11_DBG); |
|
3010 for (i = 0; i < ulSlotCount; i++) |
|
3011 { |
|
3012 current_slot = pSlotList[i]; |
|
3013 |
|
3014 DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG, |
|
3015 current_slot); |
|
3016 /* Check if slot has random support. */ |
|
3017 rv = pFuncList->C_GetTokenInfo(current_slot, &token_info); |
|
3018 if (rv != CKR_OK) |
|
3019 continue; |
|
3020 |
|
3021 DEBUG_SLOT_SEL("%s: token label: %.32s\n", PK11_DBG, |
|
3022 token_info.label); |
|
3023 |
|
3024 if (token_info.flags & CKF_RNG) |
|
3025 { |
|
3026 DEBUG_SLOT_SEL( |
|
3027 "%s: this token has CKF_RNG flag\n", PK11_DBG); |
|
3028 pk11_have_random = CK_TRUE; |
|
3029 rand_SLOTID = current_slot; |
|
3030 break; |
|
3031 } |
|
3032 } |
|
3033 |
|
3034 DEBUG_SLOT_SEL("%s: == checking pubkey slots ==\n", PK11_DBG); |
|
3035 |
|
3036 pubkey_SLOTID = pSlotList[0]; |
3012 pubkey_SLOTID = pSlotList[0]; |
3037 for (i = 0; i < ulSlotCount; i++) |
3013 for (i = 0; i < ulSlotCount; i++) |
3038 { |
3014 { |
3039 CK_BBOOL slot_has_rsa = CK_FALSE; |
|
3040 CK_BBOOL slot_has_dsa = CK_FALSE; |
|
3041 CK_BBOOL slot_has_dh = CK_FALSE; |
|
3042 current_slot = pSlotList[i]; |
3015 current_slot = pSlotList[i]; |
3043 |
3016 |
3044 DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG, |
3017 DEBUG_SLOT_SEL("%s: == checking slot: %d ==\n", PK11_DBG, |
3045 current_slot); |
3018 current_slot); |
3046 rv = pFuncList->C_GetTokenInfo(current_slot, &token_info); |
3019 rv = pFuncList->C_GetTokenInfo(current_slot, &token_info); |
3047 if (rv != CKR_OK) |
3020 if (rv != CKR_OK) |
3048 continue; |
3021 continue; |
3049 |
3022 |
3050 DEBUG_SLOT_SEL("%s: token label: %.32s\n", PK11_DBG, |
3023 DEBUG_SLOT_SEL("%s: token label: %.32s\n", PK11_DBG, |
3051 token_info.label); |
3024 token_info.label); |
3052 |
3025 pk11_choose_rand_slot(token_info, current_slot); |
3053 #ifndef OPENSSL_NO_RSA |
3026 |
3054 /* |
3027 pk11_choose_pubkey_slot(mech_info, token_info, current_slot, |
3055 * Check if this slot is capable of signing and |
3028 rv, best_number_of_mechs, best_pubkey_slot_sofar); |
3056 * verifying with CKM_RSA_PKCS. |
3029 |
3057 */ |
3030 pk11_choose_cipher_digest(&local_cipher_nids, |
3058 rv = pFuncList->C_GetMechanismInfo(current_slot, CKM_RSA_PKCS, |
3031 &local_digest_nids, pFuncList, current_slot); |
3059 &mech_info); |
3032 } |
3060 |
3033 |
3061 if (rv == CKR_OK && ((mech_info.flags & CKF_SIGN) && |
3034 if (best_number_of_mechs == 0) |
3062 (mech_info.flags & CKF_VERIFY))) |
3035 { |
3063 { |
3036 DEBUG_SLOT_SEL("%s: no rsa/dsa/dh\n", PK11_DBG); |
3064 /* |
3037 } |
3065 * Check if this slot is capable of encryption, |
3038 else |
3066 * decryption, sign, and verify with CKM_RSA_X_509. |
3039 { |
3067 */ |
3040 pubkey_SLOTID = best_pubkey_slot_sofar; |
3068 rv = pFuncList->C_GetMechanismInfo(current_slot, |
|
3069 CKM_RSA_X_509, &mech_info); |
|
3070 |
|
3071 if (rv == CKR_OK && ((mech_info.flags & CKF_SIGN) && |
|
3072 (mech_info.flags & CKF_VERIFY) && |
|
3073 (mech_info.flags & CKF_ENCRYPT) && |
|
3074 (mech_info.flags & CKF_VERIFY_RECOVER) && |
|
3075 (mech_info.flags & CKF_DECRYPT))) |
|
3076 { |
|
3077 slot_has_rsa = CK_TRUE; |
|
3078 } |
|
3079 } |
|
3080 #endif /* OPENSSL_NO_RSA */ |
|
3081 |
|
3082 #ifndef OPENSSL_NO_DSA |
|
3083 /* |
|
3084 * Check if this slot is capable of signing and |
|
3085 * verifying with CKM_DSA. |
|
3086 */ |
|
3087 rv = pFuncList->C_GetMechanismInfo(current_slot, CKM_DSA, |
|
3088 &mech_info); |
|
3089 if (rv == CKR_OK && ((mech_info.flags & CKF_SIGN) && |
|
3090 (mech_info.flags & CKF_VERIFY))) |
|
3091 { |
|
3092 slot_has_dsa = CK_TRUE; |
|
3093 } |
|
3094 |
|
3095 #endif /* OPENSSL_NO_DSA */ |
|
3096 |
|
3097 #ifndef OPENSSL_NO_DH |
|
3098 /* |
|
3099 * Check if this slot is capable of DH key generataion and |
|
3100 * derivation. |
|
3101 */ |
|
3102 rv = pFuncList->C_GetMechanismInfo(current_slot, |
|
3103 CKM_DH_PKCS_KEY_PAIR_GEN, &mech_info); |
|
3104 |
|
3105 if (rv == CKR_OK && (mech_info.flags & CKF_GENERATE_KEY_PAIR)) |
|
3106 { |
|
3107 rv = pFuncList->C_GetMechanismInfo(current_slot, |
|
3108 CKM_DH_PKCS_DERIVE, &mech_info); |
|
3109 if (rv == CKR_OK && (mech_info.flags & CKF_DERIVE)) |
|
3110 { |
|
3111 slot_has_dh = CK_TRUE; |
|
3112 } |
|
3113 } |
|
3114 #endif /* OPENSSL_NO_DH */ |
|
3115 |
|
3116 if (!found_candidate_slot && |
|
3117 (slot_has_rsa || slot_has_dsa || slot_has_dh)) |
|
3118 { |
|
3119 DEBUG_SLOT_SEL( |
|
3120 "%s: potential slot: %d\n", PK11_DBG, current_slot); |
|
3121 best_slot_sofar = current_slot; |
|
3122 pk11_have_rsa = slot_has_rsa; |
|
3123 pk11_have_dsa = slot_has_dsa; |
|
3124 pk11_have_dh = slot_has_dh; |
|
3125 found_candidate_slot = CK_TRUE; |
|
3126 /* |
|
3127 * Cache the flags for later use. We might need those if |
|
3128 * RSA keys by reference feature is used. |
|
3129 */ |
|
3130 pubkey_token_flags = token_info.flags; |
|
3131 DEBUG_SLOT_SEL( |
|
3132 "%s: setting found_candidate_slot to CK_TRUE\n", |
|
3133 PK11_DBG); |
|
3134 DEBUG_SLOT_SEL("%s: best slot so far: %d\n", PK11_DBG, |
|
3135 best_slot_sofar); |
|
3136 DEBUG_SLOT_SEL("%s: pubkey flags changed to " |
|
3137 "%lu.\n", PK11_DBG, pubkey_token_flags); |
|
3138 } |
|
3139 else |
|
3140 { |
|
3141 DEBUG_SLOT_SEL("%s: no rsa/dsa/dh\n", PK11_DBG); |
|
3142 } |
|
3143 } /* for */ |
|
3144 |
|
3145 if (found_candidate_slot == CK_TRUE) |
|
3146 { |
|
3147 pubkey_SLOTID = best_slot_sofar; |
|
3148 } |
|
3149 |
|
3150 found_candidate_slot = CK_FALSE; |
|
3151 best_slot_sofar = 0; |
|
3152 |
|
3153 DEBUG_SLOT_SEL("%s: == checking cipher/digest ==\n", PK11_DBG); |
|
3154 |
|
3155 SLOTID = pSlotList[0]; |
|
3156 for (i = 0; i < ulSlotCount; i++) |
|
3157 { |
|
3158 current_slot = pSlotList[i]; |
|
3159 |
|
3160 DEBUG_SLOT_SEL("%s: checking slot: %d\n", PK11_DBG, |
|
3161 current_slot); |
|
3162 |
|
3163 current_slot_n_cipher = 0; |
|
3164 current_slot_n_digest = 0; |
|
3165 (void) memset(local_cipher_nids, 0, sizeof (local_cipher_nids)); |
|
3166 (void) memset(local_digest_nids, 0, sizeof (local_digest_nids)); |
|
3167 |
|
3168 pk11_find_symmetric_ciphers(pFuncList, current_slot, |
|
3169 ¤t_slot_n_cipher, local_cipher_nids); |
|
3170 |
|
3171 pk11_find_digests(pFuncList, current_slot, |
|
3172 ¤t_slot_n_digest, local_digest_nids); |
|
3173 |
|
3174 DEBUG_SLOT_SEL("%s: current_slot_n_cipher %d\n", PK11_DBG, |
|
3175 current_slot_n_cipher); |
|
3176 DEBUG_SLOT_SEL("%s: current_slot_n_digest %d\n", PK11_DBG, |
|
3177 current_slot_n_digest); |
|
3178 DEBUG_SLOT_SEL("%s: best cipher/digest slot so far: %d\n", |
|
3179 PK11_DBG, best_slot_sofar); |
|
3180 |
|
3181 /* |
|
3182 * If the current slot supports more ciphers/digests than |
|
3183 * the previous best one we change the current best to this one, |
|
3184 * otherwise leave it where it is. |
|
3185 */ |
|
3186 if ((current_slot_n_cipher + current_slot_n_digest) > |
|
3187 (slot_n_cipher + slot_n_digest)) |
|
3188 { |
|
3189 DEBUG_SLOT_SEL("%s: changing best slot to %d\n", |
|
3190 PK11_DBG, current_slot); |
|
3191 best_slot_sofar = SLOTID = current_slot; |
|
3192 cipher_count = slot_n_cipher = current_slot_n_cipher; |
|
3193 digest_count = slot_n_digest = current_slot_n_digest; |
|
3194 (void) memcpy(cipher_nids, local_cipher_nids, |
|
3195 sizeof (local_cipher_nids)); |
|
3196 (void) memcpy(digest_nids, local_digest_nids, |
|
3197 sizeof (local_digest_nids)); |
|
3198 } |
|
3199 } |
3041 } |
3200 |
3042 |
3201 DEBUG_SLOT_SEL("%s: chosen pubkey slot: %d\n", PK11_DBG, pubkey_SLOTID); |
3043 DEBUG_SLOT_SEL("%s: chosen pubkey slot: %d\n", PK11_DBG, pubkey_SLOTID); |
3202 DEBUG_SLOT_SEL("%s: chosen rand slot: %d\n", PK11_DBG, rand_SLOTID); |
3044 DEBUG_SLOT_SEL("%s: chosen rand slot: %d\n", PK11_DBG, rand_SLOTID); |
3203 DEBUG_SLOT_SEL("%s: chosen cipher/digest slot: %d\n", PK11_DBG, SLOTID); |
3045 DEBUG_SLOT_SEL("%s: chosen cipher/digest slot: %d\n", PK11_DBG, SLOTID); |
3209 DEBUG_SLOT_SEL("%s: digest_count %d\n", PK11_DBG, digest_count); |
3051 DEBUG_SLOT_SEL("%s: digest_count %d\n", PK11_DBG, digest_count); |
3210 |
3052 |
3211 if (pSlotList != NULL) |
3053 if (pSlotList != NULL) |
3212 OPENSSL_free(pSlotList); |
3054 OPENSSL_free(pSlotList); |
3213 |
3055 |
3214 #ifdef SOLARIS_HW_SLOT_SELECTION |
3056 #ifdef SOLARIS_HW_SLOT_SELECTION |
3215 OPENSSL_free(hw_cnids); |
3057 OPENSSL_free(hw_cnids); |
3216 OPENSSL_free(hw_dnids); |
3058 OPENSSL_free(hw_dnids); |
3217 #endif /* SOLARIS_HW_SLOT_SELECTION */ |
3059 #endif /* SOLARIS_HW_SLOT_SELECTION */ |
3218 |
3060 |
3219 if (any_slot_found != NULL) |
3061 if (any_slot_found != NULL) |
3220 *any_slot_found = 1; |
3062 *any_slot_found = 1; |
3221 return (1); |
3063 return (1); |
3222 } |
3064 } |
3223 |
3065 |
|
3066 static void pk11_choose_rand_slot(CK_TOKEN_INFO token_info, |
|
3067 CK_SLOT_ID current_slot) |
|
3068 { |
|
3069 DEBUG_SLOT_SEL("%s: checking rand slots\n", PK11_DBG); |
|
3070 |
|
3071 if (((token_info.flags & CKF_RNG) != 0) && !pk11_have_random) |
|
3072 { |
|
3073 DEBUG_SLOT_SEL( |
|
3074 "%s: this token has CKF_RNG flag\n", PK11_DBG); |
|
3075 pk11_have_random = CK_TRUE; |
|
3076 rand_SLOTID = current_slot; |
|
3077 } |
|
3078 } |
|
3079 |
|
3080 static void pk11_choose_pubkey_slot(CK_MECHANISM_INFO mech_info, |
|
3081 CK_TOKEN_INFO token_info, CK_SLOT_ID current_slot, CK_RV rv, |
|
3082 int best_number_of_mechs, CK_SLOT_ID best_pubkey_slot_sofar) |
|
3083 { |
|
3084 CK_BBOOL slot_has_rsa = CK_FALSE; |
|
3085 CK_BBOOL slot_has_dsa = CK_FALSE; |
|
3086 CK_BBOOL slot_has_dh = CK_FALSE; |
|
3087 int current_number_of_mechs = 0; |
|
3088 DEBUG_SLOT_SEL("%s: checking pubkey slots\n", PK11_DBG); |
|
3089 |
|
3090 #ifndef OPENSSL_NO_RSA |
|
3091 /* |
|
3092 * Check if this slot is capable of signing and |
|
3093 * verifying with CKM_RSA_PKCS. |
|
3094 */ |
|
3095 rv = pFuncList->C_GetMechanismInfo(current_slot, CKM_RSA_PKCS, |
|
3096 &mech_info); |
|
3097 |
|
3098 if (rv == CKR_OK && ((mech_info.flags & CKF_SIGN) && |
|
3099 (mech_info.flags & CKF_VERIFY))) |
|
3100 { |
|
3101 /* |
|
3102 * Check if this slot is capable of encryption, |
|
3103 * decryption, sign, and verify with CKM_RSA_X_509. |
|
3104 */ |
|
3105 rv = pFuncList->C_GetMechanismInfo(current_slot, |
|
3106 CKM_RSA_X_509, &mech_info); |
|
3107 |
|
3108 if (rv == CKR_OK && ((mech_info.flags & CKF_SIGN) && |
|
3109 (mech_info.flags & CKF_VERIFY) && |
|
3110 (mech_info.flags & CKF_ENCRYPT) && |
|
3111 (mech_info.flags & CKF_VERIFY_RECOVER) && |
|
3112 (mech_info.flags & CKF_DECRYPT))) |
|
3113 { |
|
3114 slot_has_rsa = CK_TRUE; |
|
3115 current_number_of_mechs++; |
|
3116 } |
|
3117 } |
|
3118 #endif /* OPENSSL_NO_RSA */ |
|
3119 |
|
3120 #ifndef OPENSSL_NO_DSA |
|
3121 /* |
|
3122 * Check if this slot is capable of signing and |
|
3123 * verifying with CKM_DSA. |
|
3124 */ |
|
3125 rv = pFuncList->C_GetMechanismInfo(current_slot, CKM_DSA, |
|
3126 &mech_info); |
|
3127 if (rv == CKR_OK && ((mech_info.flags & CKF_SIGN) && |
|
3128 (mech_info.flags & CKF_VERIFY))) |
|
3129 { |
|
3130 slot_has_dsa = CK_TRUE; |
|
3131 current_number_of_mechs++; |
|
3132 } |
|
3133 |
|
3134 #endif /* OPENSSL_NO_DSA */ |
|
3135 |
|
3136 #ifndef OPENSSL_NO_DH |
|
3137 /* |
|
3138 * Check if this slot is capable of DH key generataion and |
|
3139 * derivation. |
|
3140 */ |
|
3141 rv = pFuncList->C_GetMechanismInfo(current_slot, |
|
3142 CKM_DH_PKCS_KEY_PAIR_GEN, &mech_info); |
|
3143 |
|
3144 if (rv == CKR_OK && (mech_info.flags & CKF_GENERATE_KEY_PAIR)) |
|
3145 { |
|
3146 rv = pFuncList->C_GetMechanismInfo(current_slot, |
|
3147 CKM_DH_PKCS_DERIVE, &mech_info); |
|
3148 if (rv == CKR_OK && (mech_info.flags & CKF_DERIVE)) |
|
3149 { |
|
3150 slot_has_dh = CK_TRUE; |
|
3151 current_number_of_mechs++; |
|
3152 } |
|
3153 } |
|
3154 #endif /* OPENSSL_NO_DH */ |
|
3155 |
|
3156 if (current_number_of_mechs > best_number_of_mechs) |
|
3157 { |
|
3158 best_pubkey_slot_sofar = current_slot; |
|
3159 pk11_have_rsa = slot_has_rsa; |
|
3160 pk11_have_dsa = slot_has_dsa; |
|
3161 pk11_have_dh = slot_has_dh; |
|
3162 best_number_of_mechs = current_number_of_mechs; |
|
3163 /* |
|
3164 * Cache the flags for later use. We might need those if |
|
3165 * RSA keys by reference feature is used. |
|
3166 */ |
|
3167 pubkey_token_flags = token_info.flags; |
|
3168 DEBUG_SLOT_SEL("%s: pubkey flags changed to " |
|
3169 "%lu.\n", PK11_DBG, pubkey_token_flags); |
|
3170 } |
|
3171 } |
|
3172 |
|
3173 static void pk11_choose_cipher_digest(int *local_cipher_nids, |
|
3174 int *local_digest_nids, CK_FUNCTION_LIST_PTR pflist, |
|
3175 CK_SLOT_ID current_slot) |
|
3176 { |
|
3177 int current_slot_n_cipher = 0; |
|
3178 int current_slot_n_digest = 0; |
|
3179 |
|
3180 DEBUG_SLOT_SEL("%s: checking cipher/digest\n", PK11_DBG); |
|
3181 |
|
3182 (void) memset(local_cipher_nids, 0, sizeof (local_cipher_nids)); |
|
3183 (void) memset(local_digest_nids, 0, sizeof (local_digest_nids)); |
|
3184 |
|
3185 pk11_find_symmetric_ciphers(pFuncList, current_slot, |
|
3186 ¤t_slot_n_cipher, local_cipher_nids); |
|
3187 |
|
3188 pk11_find_digests(pFuncList, current_slot, |
|
3189 ¤t_slot_n_digest, local_digest_nids); |
|
3190 |
|
3191 DEBUG_SLOT_SEL("%s: current_slot_n_cipher %d\n", PK11_DBG, |
|
3192 current_slot_n_cipher); |
|
3193 DEBUG_SLOT_SEL("%s: current_slot_n_digest %d\n", PK11_DBG, |
|
3194 current_slot_n_digest); |
|
3195 |
|
3196 /* |
|
3197 * If the current slot supports more ciphers/digests than |
|
3198 * the previous best one we change the current best to this one, |
|
3199 * otherwise leave it where it is. |
|
3200 */ |
|
3201 if ((current_slot_n_cipher + current_slot_n_digest) > |
|
3202 (cipher_count + digest_count)) |
|
3203 { |
|
3204 DEBUG_SLOT_SEL("%s: changing best slot to %d\n", |
|
3205 PK11_DBG, current_slot); |
|
3206 SLOTID = current_slot; |
|
3207 cipher_count = current_slot_n_cipher; |
|
3208 digest_count = current_slot_n_digest; |
|
3209 (void) memcpy(cipher_nids, local_cipher_nids, |
|
3210 sizeof (local_cipher_nids)); |
|
3211 (void) memcpy(digest_nids, local_digest_nids, |
|
3212 sizeof (local_digest_nids)); |
|
3213 } |
|
3214 } |
|
3215 |
3224 static void pk11_get_symmetric_cipher(CK_FUNCTION_LIST_PTR pflist, |
3216 static void pk11_get_symmetric_cipher(CK_FUNCTION_LIST_PTR pflist, |
3225 int slot_id, int *current_slot_n_cipher, int *local_cipher_nids, |
3217 int slot_id, int *current_slot_n_cipher, int *local_cipher_nids, |
3226 PK11_CIPHER *cipher) |
3218 PK11_CIPHER *cipher) |
3227 { |
3219 { |
3228 CK_MECHANISM_INFO mech_info; |
3220 static CK_MECHANISM_INFO mech_info; |
3229 CK_RV rv; |
3221 static CK_RV rv; |
|
3222 static CK_MECHANISM_TYPE last_checked_mech = (CK_MECHANISM_TYPE)-1; |
3230 |
3223 |
3231 DEBUG_SLOT_SEL("%s: checking mech: %x", PK11_DBG, cipher->mech_type); |
3224 DEBUG_SLOT_SEL("%s: checking mech: %x", PK11_DBG, cipher->mech_type); |
3232 rv = pflist->C_GetMechanismInfo(slot_id, cipher->mech_type, &mech_info); |
3225 if (cipher->mech_type != last_checked_mech) |
|
3226 { |
|
3227 rv = pflist->C_GetMechanismInfo(slot_id, cipher->mech_type, |
|
3228 &mech_info); |
|
3229 } |
|
3230 |
|
3231 last_checked_mech = cipher->mech_type; |
3233 |
3232 |
3234 if (rv != CKR_OK) |
3233 if (rv != CKR_OK) |
3235 { |
3234 { |
3236 DEBUG_SLOT_SEL(" not found\n"); |
3235 DEBUG_SLOT_SEL(" not found\n"); |
3237 return; |
3236 return; |