Browse Source

Fix #1240

pull/1243/head
Max Lv 7 years ago
parent
commit
6520f340bb
1 changed files with 5 additions and 0 deletions
  1. 5
      src/aead.c

5
src/aead.c

@ -313,6 +313,11 @@ aead_cipher_ctx_set_key(cipher_ctx_t *cipher_ctx, int enc)
memset(cipher_ctx->nonce, 0, cipher_ctx->cipher->nonce_len);
/* cipher that don't use mbed TLS, just return */
if (cipher_ctx->cipher->method >= CHACHA20POLY1305IETF) {
return;
}
if (mbedtls_cipher_setkey(cipher_ctx->evp, cipher_ctx->skey,
cipher_ctx->cipher->key_len * 8, enc) != 0) {
FATAL("Cannot set mbed TLS cipher key");

Loading…
Cancel
Save