Add -check_crl option to certverify

This commit is contained in:
Zhi Guan
2023-01-31 22:14:41 +08:00
parent b5df2121d3
commit 8397280779
6 changed files with 194 additions and 11 deletions

View File

@@ -340,8 +340,7 @@ int x509_cert_get_issuer_and_serial_number(const uint8_t *a, size_t alen,
int x509_cert_get_issuer(const uint8_t *a, size_t alen, const uint8_t **name, size_t *namelen);
int x509_cert_get_subject(const uint8_t *a, size_t alen, const uint8_t **subj, size_t *subj_len);
int x509_cert_get_subject_public_key(const uint8_t *a, size_t alen, SM2_KEY *public_key);
#define x509_cert_get_exts(a,alen,d,dlen) x509_cert_get_details(a,alen,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,d,dlen,NULL,NULL,NULL)
int x509_cert_get_exts(const uint8_t *a, size_t alen, const uint8_t **d, size_t *dlen);
int x509_certs_to_pem(const uint8_t *d, size_t dlen, FILE *fp);
int x509_certs_from_pem(uint8_t *d, size_t *dlen, size_t maxlen, FILE *fp);

View File

@@ -304,7 +304,9 @@ int x509_crls_print(FILE *fp, int fmt, int ind, const char *label, const uint8_t
int x509_crl_new_from_uri(uint8_t **crl, size_t *crl_len, const char *uri, size_t urilen);
int x509_crl_new_from_cert(uint8_t **crl, size_t *crl_len, const uint8_t *cert, size_t certlen);
int x509_cert_check_crl(const uint8_t *cert, size_t certlen, const uint8_t *cacert, size_t cacertlen,
const char *ca_signer_id, size_t ca_signer_id_len);
#ifdef __cplusplus