diff options
author | 2014-08-04 04:16:11 +0000 | |
---|---|---|
committer | 2014-08-04 04:16:11 +0000 | |
commit | b31ba9bc4c9c48ca1c16f20053699ef573ee0ced (patch) | |
tree | 18f510eaaf33ca38342209292a66d866749a8cec /lib/libssl/src | |
parent | Only allow GET and HEAD for static files or return 405. (diff) | |
download | wireguard-openbsd-b31ba9bc4c9c48ca1c16f20053699ef573ee0ced.tar.xz wireguard-openbsd-b31ba9bc4c9c48ca1c16f20053699ef573ee0ced.zip |
In chacha_init(), allow for a NULL iv. Reported by znz on github.
ok guenther@ jsing@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/evp/e_chacha.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/evp/e_chacha.c b/lib/libssl/src/crypto/evp/e_chacha.c index 0a5ab98cdbe..b63f586bba8 100644 --- a/lib/libssl/src/crypto/evp/e_chacha.c +++ b/lib/libssl/src/crypto/evp/e_chacha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_chacha.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */ +/* $OpenBSD: e_chacha.c,v 1.5 2014/08/04 04:16:11 miod Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -53,7 +53,8 @@ chacha_init(EVP_CIPHER_CTX *ctx, const unsigned char *key, { ChaCha_set_key((ChaCha_ctx *)ctx->cipher_data, key, EVP_CIPHER_CTX_key_length(ctx) * 8); - ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, NULL); + if (iv != NULL) + ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, NULL); return 1; } |