diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/evp/e_chacha.c | 5 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/evp/e_chacha.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libcrypto/evp/e_chacha.c b/src/lib/libcrypto/evp/e_chacha.c index 0a5ab98cdb..b63f586bba 100644 --- a/src/lib/libcrypto/evp/e_chacha.c +++ b/src/lib/libcrypto/evp/e_chacha.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_chacha.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */ | 1 | /* $OpenBSD: e_chacha.c,v 1.5 2014/08/04 04:16:11 miod Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -53,7 +53,8 @@ chacha_init(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
| 53 | { | 53 | { |
| 54 | ChaCha_set_key((ChaCha_ctx *)ctx->cipher_data, key, | 54 | ChaCha_set_key((ChaCha_ctx *)ctx->cipher_data, key, |
| 55 | EVP_CIPHER_CTX_key_length(ctx) * 8); | 55 | EVP_CIPHER_CTX_key_length(ctx) * 8); |
| 56 | ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, NULL); | 56 | if (iv != NULL) |
| 57 | ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, NULL); | ||
| 57 | return 1; | 58 | return 1; |
| 58 | } | 59 | } |
| 59 | 60 | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_chacha.c b/src/lib/libssl/src/crypto/evp/e_chacha.c index 0a5ab98cdb..b63f586bba 100644 --- a/src/lib/libssl/src/crypto/evp/e_chacha.c +++ b/src/lib/libssl/src/crypto/evp/e_chacha.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_chacha.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */ | 1 | /* $OpenBSD: e_chacha.c,v 1.5 2014/08/04 04:16:11 miod Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -53,7 +53,8 @@ chacha_init(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
| 53 | { | 53 | { |
| 54 | ChaCha_set_key((ChaCha_ctx *)ctx->cipher_data, key, | 54 | ChaCha_set_key((ChaCha_ctx *)ctx->cipher_data, key, |
| 55 | EVP_CIPHER_CTX_key_length(ctx) * 8); | 55 | EVP_CIPHER_CTX_key_length(ctx) * 8); |
| 56 | ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, NULL); | 56 | if (iv != NULL) |
| 57 | ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, NULL); | ||
| 57 | return 1; | 58 | return 1; |
| 58 | } | 59 | } |
| 59 | 60 | ||
