Include string.h (whis is in all relevant standards) instead of
[openssl.git] / crypto / pkcs12 / p12_crpt.c
index d94265403afd7350551cbaf584a148f778565f97..7b96584f07d7428fcf7b7dec3122f6a8cad2eaec 100644 (file)
@@ -70,10 +70,12 @@ EVP_PBE_alg_add(NID_pbe_WithSHA1And128BitRC4, EVP_rc4(), EVP_sha1(),
 EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC4, EVP_rc4_40(), EVP_sha1(),
                                                         PKCS12_PBE_keyivgen);
 #endif
+#ifndef NO_DES
 EVP_PBE_alg_add(NID_pbe_WithSHA1And3_Key_TripleDES_CBC,
                        EVP_des_ede3_cbc(), EVP_sha1(), PKCS12_PBE_keyivgen);
 EVP_PBE_alg_add(NID_pbe_WithSHA1And2_Key_TripleDES_CBC, 
                        EVP_des_ede_cbc(), EVP_sha1(), PKCS12_PBE_keyivgen);
+#endif
 #ifndef NO_RC2
 EVP_PBE_alg_add(NID_pbe_WithSHA1And128BitRC2_CBC, EVP_rc2_cbc(),
                                        EVP_sha1(), PKCS12_PBE_keyivgen);
@@ -92,7 +94,7 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
 
        /* Extract useful info from parameter */
        pbuf = param->value.sequence->data;
-       if (!param || (param->type = V_ASN1_SEQUENCE) ||
+       if (!param || (param->type != V_ASN1_SEQUENCE) ||
           !(pbe = d2i_PBEPARAM (NULL, &pbuf, param->value.sequence->length))) {
                EVPerr(PKCS12_F_PKCS12_PBE_KEYIVGEN,EVP_R_DECODE_ERROR);
                return 0;