mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Update tools use v3 API
This commit is contained in:
@@ -56,9 +56,11 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
X509_CERTIFICATE cert;
|
||||
uint8_t cert[1024];
|
||||
size_t certlen;
|
||||
|
||||
for (;;) {
|
||||
int ret = x509_certificate_from_pem(&cert, stdin);
|
||||
int ret = x509_cert_from_pem(cert, &certlen, sizeof(cert), stdin);
|
||||
if (ret < 0) {
|
||||
error_print();
|
||||
return -1;
|
||||
@@ -67,8 +69,8 @@ int main(void)
|
||||
goto end;
|
||||
}
|
||||
fprintf(stdout, "Certificate\n");
|
||||
x509_certificate_print(stdout, &cert, 0, 0);
|
||||
x509_certificate_to_pem(&cert, stdout);
|
||||
x509_cert_print(stdout, 0, 0, cert, certlen);
|
||||
x509_cert_to_pem(cert, certlen, stdout);
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
end:
|
||||
|
||||
Reference in New Issue
Block a user