diff options
author | 杨洋 <yang.yang@baishancloud.com> | 2018-10-26 21:34:08 +0800 |
---|---|---|
committer | Paul Yang <yang.yang@baishancloud.com> | 2019-03-13 15:29:39 +0800 |
commit | 8267becb8b2e3b5ec4d46e3df5656b747930be79 (patch) | |
tree | 1b871bd0880a5d036c4071c1b6f5a496cea150a2 /include/openssl | |
parent | 9e11fe0d85c7d8bd2b77076c8b2e93433091e765 (diff) | |
download | openssl-8267becb8b2e3b5ec4d46e3df5656b747930be79.zip openssl-8267becb8b2e3b5ec4d46e3df5656b747930be79.tar.gz openssl-8267becb8b2e3b5ec4d46e3df5656b747930be79.tar.bz2 |
Support SM2 certificate verification
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8321)
Diffstat (limited to 'include/openssl')
-rw-r--r-- | include/openssl/obj_mac.h | 5 | ||||
-rw-r--r-- | include/openssl/x509.h | 3 | ||||
-rw-r--r-- | include/openssl/x509err.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/openssl/obj_mac.h b/include/openssl/obj_mac.h index 80353ad..c8cb5ce 100644 --- a/include/openssl/obj_mac.h +++ b/include/openssl/obj_mac.h @@ -1200,6 +1200,11 @@ #define NID_sm3WithRSAEncryption 1144 #define OBJ_sm3WithRSAEncryption OBJ_sm_scheme,504L +#define SN_SM2_with_SM3 "SM2-SM3" +#define LN_SM2_with_SM3 "SM2-with-SM3" +#define NID_SM2_with_SM3 1204 +#define OBJ_SM2_with_SM3 OBJ_sm_scheme,501L + #define LN_hmacWithSHA224 "hmacWithSHA224" #define NID_hmacWithSHA224 798 #define OBJ_hmacWithSHA224 OBJ_rsadsi,2L,8L diff --git a/include/openssl/x509.h b/include/openssl/x509.h index bf127c0..ace3fb0 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -566,6 +566,9 @@ void X509_get0_signature(const ASN1_BIT_STRING **psig, const X509_ALGOR **palg, const X509 *x); int X509_get_signature_nid(const X509 *x); +void X509_set_sm2_id(X509 *x, ASN1_OCTET_STRING *sm2_id); +ASN1_OCTET_STRING *X509_get0_sm2_id(X509 *x); + int X509_trusted(const X509 *x); int X509_alias_set1(X509 *x, const unsigned char *name, int len); int X509_keyid_set1(X509 *x, const unsigned char *id, int len); diff --git a/include/openssl/x509err.h b/include/openssl/x509err.h index 64361dc..78d1c89 100644 --- a/include/openssl/x509err.h +++ b/include/openssl/x509err.h @@ -82,8 +82,10 @@ int ERR_load_X509_strings(void); # define X509_F_X509_TO_X509_REQ 126 # define X509_F_X509_TRUST_ADD 133 # define X509_F_X509_TRUST_SET 141 +# define X509_F_X509_VERIFY 161 # define X509_F_X509_VERIFY_CERT 127 # define X509_F_X509_VERIFY_PARAM_NEW 159 +# define X509_F_X509_VERIFY_SM2 162 /* * X509 reason codes. |