diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/pkcs12/p12_crpt.c | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_crpt.c')
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_crpt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_crpt.c b/src/lib/libcrypto/pkcs12/p12_crpt.c index 7b96584f07..97be6a5fb5 100644 --- a/src/lib/libcrypto/pkcs12/p12_crpt.c +++ b/src/lib/libcrypto/pkcs12/p12_crpt.c | |||
@@ -64,19 +64,19 @@ | |||
64 | 64 | ||
65 | void PKCS12_PBE_add(void) | 65 | void PKCS12_PBE_add(void) |
66 | { | 66 | { |
67 | #ifndef NO_RC4 | 67 | #ifndef OPENSSL_NO_RC4 |
68 | EVP_PBE_alg_add(NID_pbe_WithSHA1And128BitRC4, EVP_rc4(), EVP_sha1(), | 68 | EVP_PBE_alg_add(NID_pbe_WithSHA1And128BitRC4, EVP_rc4(), EVP_sha1(), |
69 | PKCS12_PBE_keyivgen); | 69 | PKCS12_PBE_keyivgen); |
70 | EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC4, EVP_rc4_40(), EVP_sha1(), | 70 | EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC4, EVP_rc4_40(), EVP_sha1(), |
71 | PKCS12_PBE_keyivgen); | 71 | PKCS12_PBE_keyivgen); |
72 | #endif | 72 | #endif |
73 | #ifndef NO_DES | 73 | #ifndef OPENSSL_NO_DES |
74 | EVP_PBE_alg_add(NID_pbe_WithSHA1And3_Key_TripleDES_CBC, | 74 | EVP_PBE_alg_add(NID_pbe_WithSHA1And3_Key_TripleDES_CBC, |
75 | EVP_des_ede3_cbc(), EVP_sha1(), PKCS12_PBE_keyivgen); | 75 | EVP_des_ede3_cbc(), EVP_sha1(), PKCS12_PBE_keyivgen); |
76 | EVP_PBE_alg_add(NID_pbe_WithSHA1And2_Key_TripleDES_CBC, | 76 | EVP_PBE_alg_add(NID_pbe_WithSHA1And2_Key_TripleDES_CBC, |
77 | EVP_des_ede_cbc(), EVP_sha1(), PKCS12_PBE_keyivgen); | 77 | EVP_des_ede_cbc(), EVP_sha1(), PKCS12_PBE_keyivgen); |
78 | #endif | 78 | #endif |
79 | #ifndef NO_RC2 | 79 | #ifndef OPENSSL_NO_RC2 |
80 | EVP_PBE_alg_add(NID_pbe_WithSHA1And128BitRC2_CBC, EVP_rc2_cbc(), | 80 | EVP_PBE_alg_add(NID_pbe_WithSHA1And128BitRC2_CBC, EVP_rc2_cbc(), |
81 | EVP_sha1(), PKCS12_PBE_keyivgen); | 81 | EVP_sha1(), PKCS12_PBE_keyivgen); |
82 | EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC2_CBC, EVP_rc2_40_cbc(), | 82 | EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC2_CBC, EVP_rc2_40_cbc(), |
@@ -85,7 +85,7 @@ EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC2_CBC, EVP_rc2_40_cbc(), | |||
85 | } | 85 | } |
86 | 86 | ||
87 | int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | 87 | int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, |
88 | ASN1_TYPE *param, EVP_CIPHER *cipher, EVP_MD *md, int en_de) | 88 | ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de) |
89 | { | 89 | { |
90 | PBEPARAM *pbe; | 90 | PBEPARAM *pbe; |
91 | int saltlen, iter; | 91 | int saltlen, iter; |
@@ -117,7 +117,7 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | |||
117 | return 0; | 117 | return 0; |
118 | } | 118 | } |
119 | PBEPARAM_free(pbe); | 119 | PBEPARAM_free(pbe); |
120 | EVP_CipherInit(ctx, cipher, key, iv, en_de); | 120 | EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); |
121 | memset(key, 0, EVP_MAX_KEY_LENGTH); | 121 | memset(key, 0, EVP_MAX_KEY_LENGTH); |
122 | memset(iv, 0, EVP_MAX_IV_LENGTH); | 122 | memset(iv, 0, EVP_MAX_IV_LENGTH); |
123 | return 1; | 123 | return 1; |