mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-06 16:36:16 +08:00
Update X509 and certgen tool
This commit is contained in:
@@ -104,7 +104,6 @@ bad:
|
||||
fprintf(stderr, "%s: read CRL failure\n", prog);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (x509_crl_get_issuer(crl, crllen, &subject, &subject_len) != 1) {
|
||||
fprintf(stderr, "%s: inner error\n", prog);
|
||||
goto end;
|
||||
@@ -113,6 +112,10 @@ bad:
|
||||
fprintf(stderr, "%s: read certificate failure\n", prog);
|
||||
goto end;
|
||||
}
|
||||
if (x509_crl_validate(crl, crllen, time(NULL)) != 1) {
|
||||
fprintf(stderr, "%s: invalid CRL data or format\n", prog);
|
||||
goto end;
|
||||
}
|
||||
if ((rv = x509_crl_verify_by_ca_cert(crl, crllen, cacert, cacertlen, SM2_DEFAULT_ID, strlen(SM2_DEFAULT_ID))) < 0) {
|
||||
fprintf(stderr, "%s: verification inner error\n", prog);
|
||||
goto end;
|
||||
@@ -127,24 +130,3 @@ end:
|
||||
if (in) free(in);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user