-/* $OpenBSD: s3_lib.c,v 1.169 2018/08/27 16:48:12 jsing Exp $ */
+/* $OpenBSD: s3_lib.c,v 1.170 2018/09/06 16:40:45 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 128,
.alg_bits = 128,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 256,
.alg_bits = 256,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 128,
.alg_bits = 128,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 256,
.alg_bits = 256,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 128,
.alg_bits = 128,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 256,
.alg_bits = 256,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 128,
.alg_bits = 128,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 256,
.alg_bits = 256,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 128,
.alg_bits = 128,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(4)|
+ FIXED_NONCE_LEN(4)|
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
.strength_bits = 256,
.alg_bits = 256,
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(12),
+ FIXED_NONCE_LEN(12),
.strength_bits = 256,
.alg_bits = 256,
},
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(12),
+ FIXED_NONCE_LEN(12),
.strength_bits = 256,
.alg_bits = 256,
},
.algorithm_ssl = SSL_TLSV1_2,
.algo_strength = SSL_HIGH,
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
- SSL_CIPHER_ALGORITHM2_AEAD|FIXED_NONCE_LEN(12),
+ FIXED_NONCE_LEN(12),
.strength_bits = 256,
.alg_bits = 256,
},
-/* $OpenBSD: ssl_ciph.c,v 1.102 2018/09/03 18:00:50 jsing Exp $ */
+/* $OpenBSD: ssl_ciph.c,v 1.103 2018/09/06 16:40:45 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This function does not handle EVP_AEAD.
* See ssl_cipher_get_aead_evp instead.
*/
- if (c->algorithm2 & SSL_CIPHER_ALGORITHM2_AEAD)
+ if (c->algorithm_mac & SSL_AEAD)
return(0);
if ((enc == NULL) || (md == NULL))
*mac_pkey_type = NID_undef;
if (mac_secret_size != NULL)
*mac_secret_size = 0;
- if (c->algorithm_mac == SSL_AEAD)
- mac_pkey_type = NULL;
} else {
*md = ssl_digest_methods[i];
if (mac_pkey_type != NULL)
if (c == NULL)
return 0;
- if ((c->algorithm2 & SSL_CIPHER_ALGORITHM2_AEAD) == 0)
+ if ((c->algorithm_mac & SSL_AEAD) == 0)
return 0;
switch (c->algorithm_enc) {
-/* $OpenBSD: ssl_locl.h,v 1.213 2018/09/05 16:48:11 jsing Exp $ */
+/* $OpenBSD: ssl_locl.h,v 1.214 2018/09/06 16:40:45 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#define TLS1_PRF_STREEBOG256 (SSL_HANDSHAKE_MAC_STREEBOG256 << TLS1_PRF_DGST_SHIFT)
#define TLS1_PRF (TLS1_PRF_MD5 | TLS1_PRF_SHA1)
-/* Stream MAC for GOST ciphersuites from cryptopro draft
- * (currently this also goes into algorithm2) */
+/*
+ * Stream MAC for GOST ciphersuites from cryptopro draft
+ * (currently this also goes into algorithm2).
+ */
#define TLS1_STREAM_MAC 0x04
/*
*/
#define SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD (1 << 22)
-/*
- * SSL_CIPHER_ALGORITHM2_AEAD is an algorithm2 flag that indicates the cipher
- * is implemented via an EVP_AEAD.
- */
-#define SSL_CIPHER_ALGORITHM2_AEAD (1 << 23)
-
/*
* SSL_CIPHER_AEAD_FIXED_NONCE_LEN returns the number of bytes of fixed nonce
- * for an SSL_CIPHER with the SSL_CIPHER_ALGORITHM2_AEAD flag.
+ * for an SSL_CIPHER with an algorithm_mac of SSL_AEAD.
*/
#define SSL_CIPHER_AEAD_FIXED_NONCE_LEN(ssl_cipher) \
(((ssl_cipher->algorithm2 >> 24) & 0xf) * 2)