Add X509 verify_result

This commit is contained in:
Zhi Guan
2026-06-19 18:43:24 +08:00
parent 3d44be73cd
commit 2bcfb4a42b
7 changed files with 130 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ extern "C" {
#define GMSSL_VERSION_NUM 30200
#define GMSSL_VERSION_STR "GmSSL 3.2.0-dev.1107"
#define GMSSL_VERSION_STR "GmSSL 3.2.0-dev.1108"
int gmssl_version_num(void);
const char *gmssl_version_str(void);

View File

@@ -380,6 +380,19 @@ typedef enum {
X509_cert_chain_client,
} X509_CERT_CHAIN_TYPE;
typedef enum {
X509_verify_ok = 0,
X509_verify_err_certificate,
X509_verify_err_cert_chain,
X509_verify_err_trust_anchor,
X509_verify_err_depth,
X509_verify_err_crl,
X509_verify_err_ocsp,
X509_verify_err_constraints,
X509_verify_err_tls_extensions,
X509_verify_err_hostname,
} X509_VERIFY_RESULT;
#define X509_MAX_VERIFY_DEPTH 6
//int x509_cert_chain_verify(const uint8_t *certs, size_t certslen,
// const uint8_t *cacerts, size_t cacertslen, int depth, int *verify_result);