Latest update.

This commit is contained in:
2019-09-18 00:56:26 +09:00
parent e76cdf9b20
commit 6889043035
6 changed files with 273 additions and 233 deletions
+42 -42
View File
@@ -11,7 +11,7 @@ index a97eaa1685..24112723f0 100644
#endif
}
diff --git a/crypto/evp/e_chacha20_poly1305.c b/crypto/evp/e_chacha20_poly1305.c
index ccef031b89..083179398c 100644
index 570378b1af..46eb33910a 100644
--- a/crypto/evp/e_chacha20_poly1305.c
+++ b/crypto/evp/e_chacha20_poly1305.c
@@ -156,6 +156,7 @@ typedef struct {
@@ -171,7 +171,7 @@ index ccef031b89..083179398c 100644
}
Poly1305_Final(POLY1305_ctx(actx), ctx->encrypt ? actx->tag
: temp);
@@ -535,12 +576,14 @@ static int chacha20_poly1305_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg,
@@ -539,12 +580,14 @@ static int chacha20_poly1305_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg,
return 1;
case EVP_CTRL_AEAD_SET_IVLEN:
@@ -186,7 +186,7 @@ index ccef031b89..083179398c 100644
if (arg != 12)
return 0;
actx->nonce[0] = actx->key.counter[1]
@@ -624,9 +667,32 @@ static EVP_CIPHER chacha20_poly1305 = {
@@ -629,9 +672,32 @@ static EVP_CIPHER chacha20_poly1305 = {
NULL /* app_data */
};
@@ -220,66 +220,66 @@ index ccef031b89..083179398c 100644
# endif
#endif
diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h
index 876bab2a7f..0e825e5b8b 100644
index 0beeacfa40..8b3737f363 100644
--- a/crypto/objects/obj_dat.h
+++ b/crypto/objects/obj_dat.h
@@ -1080,7 +1080,7 @@ static const unsigned char so[7775] = {
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x83,0x75, /* [ 7766] OBJ_SM2_with_SM3 */
@@ -1084,7 +1084,7 @@ static const unsigned char so[7813] = {
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x83,0x75, /* [ 7804] OBJ_SM2_with_SM3 */
};
-#define NUM_NID 1207
+#define NUM_NID 1208
-#define NUM_NID 1208
+#define NUM_NID 1209
static const ASN1_OBJECT nid_objs[NUM_NID] = {
{"UNDEF", "undefined", NID_undef},
{"rsadsi", "RSA Data Security, Inc.", NID_rsadsi, 6, &so[0]},
@@ -2289,9 +2289,10 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = {
{"SM2-SM3", "SM2-with-SM3", NID_SM2_with_SM3, 8, &so[7766]},
@@ -2294,9 +2294,10 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = {
{"SSKDF", "sskdf", NID_sskdf},
{"X963KDF", "x963kdf", NID_x963kdf},
{"X942KDF", "x942kdf", NID_x942kdf},
+ {"ChaCha20-Poly1305-D", "chacha20-poly1305-draft", NID_chacha20_poly1305_draft},
};
-#define NUM_SN 1198
+#define NUM_SN 1199
-#define NUM_SN 1199
+#define NUM_SN 1200
static const unsigned int sn_objs[NUM_SN] = {
364, /* "AD_DVCS" */
419, /* "AES-128-CBC" */
@@ -2414,6 +2415,7 @@ static const unsigned int sn_objs[NUM_SN] = {
@@ -2419,6 +2420,7 @@ static const unsigned int sn_objs[NUM_SN] = {
417, /* "CSPName" */
1019, /* "ChaCha20" */
1018, /* "ChaCha20-Poly1305" */
+ 1207, /* "ChaCha20-Poly1305-D" */
+ 1208, /* "ChaCha20-Poly1305-D" */
367, /* "CrlID" */
391, /* "DC" */
31, /* "DES-CBC" */
@@ -3493,7 +3495,7 @@ static const unsigned int sn_objs[NUM_SN] = {
@@ -3499,7 +3501,7 @@ static const unsigned int sn_objs[NUM_SN] = {
1093, /* "x509ExtAdmission" */
};
-#define NUM_LN 1198
+#define NUM_LN 1199
-#define NUM_LN 1199
+#define NUM_LN 1200
static const unsigned int ln_objs[NUM_LN] = {
363, /* "AD Time Stamping" */
405, /* "ANSI X9.62" */
@@ -3878,6 +3880,7 @@ static const unsigned int ln_objs[NUM_LN] = {
@@ -3884,6 +3886,7 @@ static const unsigned int ln_objs[NUM_LN] = {
883, /* "certificateRevocationList" */
1019, /* "chacha20" */
1018, /* "chacha20-poly1305" */
+ 1207, /* "chacha20-poly1305-draft" */
+ 1208, /* "chacha20-poly1305-draft" */
54, /* "challengePassword" */
407, /* "characteristic-two-field" */
395, /* "clearance" */
diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num
index e0969fe1fd..957a28d47a 100644
index 022e64277c..4751e56115 100644
--- a/crypto/objects/obj_mac.num
+++ b/crypto/objects/obj_mac.num
@@ -1204,3 +1204,4 @@ sshkdf 1203
SM2_with_SM3 1204
@@ -1205,3 +1205,4 @@ SM2_with_SM3 1204
sskdf 1205
x963kdf 1206
+chacha20_poly1305_draft 1207
x942kdf 1207
+chacha20_poly1305_draft 1208
diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt
index 566438948f..92f235d5d5 100644
index 47cf2f183d..660bcd8521 100644
--- a/crypto/objects/objects.txt
+++ b/crypto/objects/objects.txt
@@ -1545,6 +1545,7 @@ sm-scheme 104 7 : SM4-CTR : sm4-ctr
@@ -291,10 +291,10 @@ index 566438948f..92f235d5d5 100644
ISO-US 10046 2 1 : dhpublicnumber : X9.42 DH
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 8195d11250..16dca70c30 100644
index 69d70e5e9c..d451c574c0 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -936,6 +936,7 @@ const EVP_CIPHER *EVP_camellia_256_ctr(void);
@@ -957,6 +957,7 @@ const EVP_CIPHER *EVP_camellia_256_ctr(void);
const EVP_CIPHER *EVP_chacha20(void);
# ifndef OPENSSL_NO_POLY1305
const EVP_CIPHER *EVP_chacha20_poly1305(void);
@@ -303,22 +303,22 @@ index 8195d11250..16dca70c30 100644
# endif
diff --git a/include/openssl/obj_mac.h b/include/openssl/obj_mac.h
index 147bad12db..6e9f141ba5 100644
index 930a7a919e..d08a9e3b26 100644
--- a/include/openssl/obj_mac.h
+++ b/include/openssl/obj_mac.h
@@ -4833,6 +4833,10 @@
@@ -4837,6 +4837,10 @@
#define LN_chacha20_poly1305 "chacha20-poly1305"
#define NID_chacha20_poly1305 1018
+#define SN_chacha20_poly1305_draft "ChaCha20-Poly1305-D"
+#define LN_chacha20_poly1305_draft "chacha20-poly1305-draft"
+#define NID_chacha20_poly1305_draft 1207
+#define NID_chacha20_poly1305_draft 1208
+
#define SN_chacha20 "ChaCha20"
#define LN_chacha20 "chacha20"
#define NID_chacha20 1019
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 7219d83420..b569270f84 100644
index 93f6bbc8f8..f11e312b54 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -125,6 +125,7 @@ extern "C" {
@@ -330,7 +330,7 @@ index 7219d83420..b569270f84 100644
# define SSL_TXT_ARIA "ARIA"
# define SSL_TXT_ARIA_GCM "ARIAGCM"
diff --git a/include/openssl/tls1.h b/include/openssl/tls1.h
index 4db2b6a0db..5b07fb3cba 100644
index f587f2a488..37ea3bdca4 100644
--- a/include/openssl/tls1.h
+++ b/include/openssl/tls1.h
@@ -567,7 +567,12 @@ __owur int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain)
@@ -372,7 +372,7 @@ index 4db2b6a0db..5b07fb3cba 100644
# define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "ECDHE-ECDSA-CHACHA20-POLY1305"
# define TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305 "DHE-RSA-CHACHA20-POLY1305"
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 3238fd9b7e..c281fed428 100644
index d23f932ce9..b02cc2d895 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -2083,6 +2083,54 @@ static SSL_CIPHER ssl3_ciphers[] = {
@@ -431,7 +431,7 @@ index 3238fd9b7e..c281fed428 100644
1,
TLS1_TXT_PSK_WITH_CHACHA20_POLY1305,
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index 6cb8b33b5b..d94adfc6a2 100644
index e427c407fc..0eb10f35b1 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -44,7 +44,8 @@
@@ -460,7 +460,7 @@ index 6cb8b33b5b..d94adfc6a2 100644
{0, SSL_TXT_ARIA, NULL, 0, 0, 0, SSL_ARIA},
{0, SSL_TXT_ARIA_GCM, NULL, 0, 0, 0, SSL_ARIA128GCM | SSL_ARIA256GCM},
@@ -1798,6 +1801,9 @@ char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
@@ -1799,6 +1802,9 @@ char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
case SSL_CHACHA20POLY1305:
enc = "CHACHA20/POLY1305(256)";
break;
@@ -470,7 +470,7 @@ index 6cb8b33b5b..d94adfc6a2 100644
default:
enc = "unknown";
break;
@@ -2122,7 +2128,7 @@ int ssl_cipher_get_overhead(const SSL_CIPHER *c, size_t *mac_overhead,
@@ -2123,7 +2129,7 @@ int ssl_cipher_get_overhead(const SSL_CIPHER *c, size_t *mac_overhead,
out = EVP_CCM_TLS_EXPLICIT_IV_LEN + 16;
} else if (c->algorithm_enc & (SSL_AES128CCM8 | SSL_AES256CCM8)) {
out = EVP_CCM_TLS_EXPLICIT_IV_LEN + 8;
@@ -480,7 +480,7 @@ index 6cb8b33b5b..d94adfc6a2 100644
} else if (c->algorithm_mac & SSL_AEAD) {
/* We're supposed to have handled all the AEAD modes above */
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h
index a61987f327..898932910f 100644
index b66979b4da..195267cb5e 100644
--- a/ssl/ssl_locl.h
+++ b/ssl/ssl_locl.h
@@ -234,12 +234,13 @@
@@ -499,11 +499,11 @@ index a61987f327..898932910f 100644
# define SSL_ARIA (SSL_ARIAGCM)
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 766c735b2f..c41dd36456 100644
index e5c869af44..e50f80c2d1 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -4833,3 +4833,4 @@ BN_CTX_new_ex 4777 3_0_0 EXIST::FUNCTION:
BN_CTX_secure_new_ex 4778 3_0_0 EXIST::FUNCTION:
OPENSSL_thread_stop_ex 4779 3_0_0 EXIST::FUNCTION:
OSSL_PARAM_locate_const 4780 3_0_0 EXIST::FUNCTION:
+EVP_chacha20_poly1305_draft 4781 3_0_0 EXIST::FUNCTION:CHACHA,POLY1305
@@ -4752,3 +4752,4 @@ EVP_PKEY_CTX_get_signature_md 4868 3_0_0 EXIST::FUNCTION:
EVP_PKEY_CTX_get_params 4869 3_0_0 EXIST::FUNCTION:
EVP_PKEY_CTX_gettable_params 4870 3_0_0 EXIST::FUNCTION:
EVP_PKEY_CTX_settable_params 4871 3_0_0 EXIST::FUNCTION:
+EVP_chacha20_poly1305_draft 4872 3_0_0 EXIST::FUNCTION:CHACHA,POLY1305