diff options
| author | djm <> | 2012-10-13 21:23:50 +0000 |
|---|---|---|
| committer | djm <> | 2012-10-13 21:23:50 +0000 |
| commit | 228cae30b117c2493f69ad3c195341cd6ec8d430 (patch) | |
| tree | 29ff00b10d52c0978077c4fd83c33b065bade73e /src/lib/libcrypto/evp/e_rc2.c | |
| parent | 731838c66b52c0ae5888333005b74115a620aa96 (diff) | |
| download | openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.gz openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.bz2 openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.zip | |
import OpenSSL-1.0.1c
Diffstat (limited to 'src/lib/libcrypto/evp/e_rc2.c')
| -rw-r--r-- | src/lib/libcrypto/evp/e_rc2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/e_rc2.c b/src/lib/libcrypto/evp/e_rc2.c index f78d781129..d4c33b58d4 100644 --- a/src/lib/libcrypto/evp/e_rc2.c +++ b/src/lib/libcrypto/evp/e_rc2.c | |||
| @@ -183,7 +183,8 @@ static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | |||
| 183 | key_bits =rc2_magic_to_meth((int)num); | 183 | key_bits =rc2_magic_to_meth((int)num); |
| 184 | if (!key_bits) | 184 | if (!key_bits) |
| 185 | return(-1); | 185 | return(-1); |
| 186 | if(i > 0) EVP_CipherInit_ex(c, NULL, NULL, NULL, iv, -1); | 186 | if(i > 0 && !EVP_CipherInit_ex(c, NULL, NULL, NULL, iv, -1)) |
| 187 | return -1; | ||
| 187 | EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_RC2_KEY_BITS, key_bits, NULL); | 188 | EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_RC2_KEY_BITS, key_bits, NULL); |
| 188 | EVP_CIPHER_CTX_set_key_length(c, key_bits / 8); | 189 | EVP_CIPHER_CTX_set_key_length(c, key_bits / 8); |
| 189 | } | 190 | } |
