diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/evp_enc.c | 7 | ||||
-rw-r--r-- | crypto/poly1305/poly1305.c | 1 | ||||
-rw-r--r-- | crypto/poly1305/poly1305_ameth.c | 1 | ||||
-rw-r--r-- | crypto/poly1305/poly1305_local.h | 27 |
4 files changed, 7 insertions, 29 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 5a6a4033ce..18adc5b586 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -278,6 +278,8 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, case NID_rc2_64_cbc: case NID_rc2_cfb64: case NID_rc2_ofb64: + case NID_chacha20: + case NID_chacha20_poly1305: break; default: goto legacy; @@ -1120,6 +1122,11 @@ int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) params[0] = OSSL_PARAM_construct_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, ptr, sz); break; + case EVP_CTRL_AEAD_SET_MAC_KEY: + params[0] = + OSSL_PARAM_construct_octet_string(OSSL_CIPHER_PARAM_AEAD_MAC_KEY, + ptr, sz); + break; case EVP_CTRL_AEAD_TLS1_AAD: /* This one does a set and a get - since it returns a padding size */ params[0] = diff --git a/crypto/poly1305/poly1305.c b/crypto/poly1305/poly1305.c index 97c0530500..127ce7da2f 100644 --- a/crypto/poly1305/poly1305.c +++ b/crypto/poly1305/poly1305.c @@ -12,7 +12,6 @@ #include <openssl/crypto.h> #include "crypto/poly1305.h" -#include "poly1305_local.h" size_t Poly1305_ctx_size(void) { diff --git a/crypto/poly1305/poly1305_ameth.c b/crypto/poly1305/poly1305_ameth.c index d69607c7bb..2feec9ccc3 100644 --- a/crypto/poly1305/poly1305_ameth.c +++ b/crypto/poly1305/poly1305_ameth.c @@ -12,7 +12,6 @@ #include <openssl/evp.h> #include "crypto/asn1.h" #include "crypto/poly1305.h" -#include "poly1305_local.h" #include "crypto/evp.h" /* diff --git a/crypto/poly1305/poly1305_local.h b/crypto/poly1305/poly1305_local.h deleted file mode 100644 index 23930c8ef4..0000000000 --- a/crypto/poly1305/poly1305_local.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -typedef void (*poly1305_blocks_f) (void *ctx, const unsigned char *inp, - size_t len, unsigned int padbit); -typedef void (*poly1305_emit_f) (void *ctx, unsigned char mac[16], - const unsigned int nonce[4]); - -struct poly1305_context { - double opaque[24]; /* large enough to hold internal state, declared - * 'double' to ensure at least 64-bit invariant - * alignment across all platforms and - * configurations */ - unsigned int nonce[4]; - unsigned char data[POLY1305_BLOCK_SIZE]; - size_t num; - struct { - poly1305_blocks_f blocks; - poly1305_emit_f emit; - } func; -}; |