From fa3cf590d5aac049a8e1d0732b4e8905a2e9d9c7 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Fri, 8 Oct 2021 13:26:28 +0200 Subject: [PATCH] Fix NID conflicts - `NID_sha224` conflicted with `NID_sha1WithRSAEncryption` - `NID_commonName` conflicted with `PBE-SHA1-3DES` - `NID_X9_62_prime239v3` conflicted with `AES128CBCb` - `NID_md5` conflicted with `NID_surname` - `NID_md2WithRSAEncryption` conflicted with `NID_localityName` - `NID_md5WithRSAEncryption` conflicted with `NID_stateOrProvinceName` NID conflicts found by examining the runtime values in `wolfssl_object_info` --- wolfssl/openssl/ec.h | 2 +- wolfssl/openssl/evp.h | 8 ++++---- wolfssl/wolfcrypt/asn.h | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/wolfssl/openssl/ec.h b/wolfssl/openssl/ec.h index cfc3bdb7f..253f808d2 100644 --- a/wolfssl/openssl/ec.h +++ b/wolfssl/openssl/ec.h @@ -45,7 +45,7 @@ enum { NID_X9_62_prime192v3 = 411, NID_X9_62_prime239v1 = 412, NID_X9_62_prime239v2 = 413, - NID_X9_62_prime239v3 = 414, + NID_X9_62_prime239v3 = 418, /* Previous value conflicted with AES128CBCb */ NID_X9_62_prime256v1 = 415, NID_secp112r1 = 704, NID_secp112r2 = 705, diff --git a/wolfssl/openssl/evp.h b/wolfssl/openssl/evp.h index 142549371..985e00b16 100644 --- a/wolfssl/openssl/evp.h +++ b/wolfssl/openssl/evp.h @@ -237,10 +237,10 @@ enum { AES_192_GCM_TYPE = 22, AES_256_GCM_TYPE = 23, NID_sha1 = 64, - NID_sha224 = 65, + NID_sha224 = 675, NID_md2 = 77, NID_md4 = 257, - NID_md5 = 4, + NID_md5 = 40, NID_hmac = 855, NID_cmac = 894, NID_dhKeyAgreement= 28, @@ -265,8 +265,8 @@ enum { enum { NID_md5WithRSA = 104, - NID_md2WithRSAEncryption = 7, - NID_md5WithRSAEncryption = 8, + NID_md2WithRSAEncryption = 9, + NID_md5WithRSAEncryption = 99, NID_dsaWithSHA1 = 113, NID_dsaWithSHA1_2 = 70, NID_sha1WithRSA = 115, diff --git a/wolfssl/wolfcrypt/asn.h b/wolfssl/wolfcrypt/asn.h index 7713abcdc..b7b241a85 100644 --- a/wolfssl/wolfcrypt/asn.h +++ b/wolfssl/wolfcrypt/asn.h @@ -705,10 +705,11 @@ enum NID_policy_constraints = 150, NID_inhibit_any_policy = 168, /* 2.5.29.54 */ NID_tlsfeature = 1020, /* id-pe 24 */ - NID_commonName = 0x03, /* matches ASN_COMMON_NAME in asn.h */ NID_buildingName = 1494, + NID_commonName = 14, /* CN Changed to not conflict + * with PBE_SHA1_DES3 */ NID_surname = 0x04, /* SN */ NID_serialNumber = 0x05, /* serialNumber */ NID_countryName = 0x06, /* C */