mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Reomve sm3 from lms/hss names
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -16,9 +16,7 @@
|
||||
#include <gmssl/asn1.h>
|
||||
#include <gmssl/error.h>
|
||||
#include <gmssl/x509_alg.h>
|
||||
#ifdef ENABLE_SM3_LMS
|
||||
#include <gmssl/sm3_lms.h>
|
||||
#endif
|
||||
|
||||
|
||||
static uint32_t oid_sm3[] = { 1,2,156,10197,1,401 };
|
||||
static uint32_t oid_md5[] = { 1,2,840,113549,2,5 };
|
||||
@@ -357,7 +355,7 @@ static const ASN1_OID_INFO x509_sign_algors[] = {
|
||||
{ OID_rsasign_with_sha256, "sha256WithRSAEncryption", oid_rsasign_with_sha256, sizeof(oid_rsasign_with_sha256)/sizeof(int), 1 },
|
||||
{ OID_rsasign_with_sha384, "sha384WithRSAEncryption", oid_rsasign_with_sha384, sizeof(oid_rsasign_with_sha384)/sizeof(int), 1 },
|
||||
{ OID_rsasign_with_sha512, "sha512WithRSAEncryption", oid_rsasign_with_sha512, sizeof(oid_rsasign_with_sha512)/sizeof(int), 1 },
|
||||
#ifdef ENABLE_SM3_LMS
|
||||
#ifdef ENABLE_LMS_HSS
|
||||
{ OID_hss_lms_hashsig, "hss-lms-hashsig", oid_hss_lms_hashsig, sizeof(oid_hss_lms_hashsig)/sizeof(int), 1 },
|
||||
#endif
|
||||
};
|
||||
@@ -577,7 +575,7 @@ static uint32_t oid_ec_public_key[] = { oid_x9_62,2,1 };
|
||||
static const ASN1_OID_INFO x509_public_key_algors[] = {
|
||||
{ OID_ec_public_key, "ecPublicKey", oid_ec_public_key, sizeof(oid_ec_public_key)/sizeof(int), 0, "X9.62 ecPublicKey" },
|
||||
{ OID_rsa_encryption, "rsaEncryption", oid_rsa_encryption, sizeof(oid_rsa_encryption)/sizeof(int), 0, "RSAEncryption" },
|
||||
#ifdef ENABLE_SM3_LMS
|
||||
#ifdef ENABLE_LMS_HSS
|
||||
{ OID_hss_lms_hashsig, "hss-lms-hashsig", oid_hss_lms_hashsig, sizeof(oid_hss_lms_hashsig)/sizeof(int), 0, "HSS/LMS HashSig" },
|
||||
#endif
|
||||
};
|
||||
@@ -630,7 +628,7 @@ int x509_public_key_algor_to_der(int oid, int curve_or_null, uint8_t **out, size
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
#ifdef ENABLE_SM3_LMS
|
||||
#ifdef ENABLE_LMS_HSS
|
||||
case OID_hss_lms_hashsig:
|
||||
if (asn1_object_identifier_to_der(oid_hss_lms_hashsig, sizeof(oid_hss_lms_hashsig)/sizeof(int), NULL, &len) != 1
|
||||
|| asn1_null_to_der(NULL, &len) != 1
|
||||
@@ -676,7 +674,7 @@ int x509_public_key_algor_from_der(int *oid , int *curve_or_null, const uint8_t
|
||||
}
|
||||
break;
|
||||
case OID_rsa_encryption:
|
||||
#ifdef ENABLE_SM3_LMS
|
||||
#ifdef ENABLE_LMS_HSS
|
||||
case OID_hss_lms_hashsig:
|
||||
#endif
|
||||
if ((*curve_or_null = asn1_null_from_der(&d, &dlen)) < 0
|
||||
@@ -709,7 +707,7 @@ int x509_public_key_algor_print(FILE *fp, int fmt, int ind, const char *label, c
|
||||
format_print(fp, fmt, ind, "namedCurve: %s\n", ec_named_curve_name(val));
|
||||
break;
|
||||
case OID_rsa_encryption:
|
||||
#ifdef ENABLE_SM3_LMS
|
||||
#ifdef ENABLE_LMS_HSS
|
||||
case OID_hss_lms_hashsig:
|
||||
#endif
|
||||
if ((val = asn1_null_from_der(&d, &dlen)) < 0) goto err;
|
||||
|
||||
Reference in New Issue
Block a user