Support different encoding types in certificate.get_encoding()
This commit is contained in:
@@ -301,8 +301,7 @@ static int issue()
|
||||
error = "generating certificate failed";
|
||||
goto end;
|
||||
}
|
||||
encoding = cert->get_encoding(cert);
|
||||
if (!encoding.ptr)
|
||||
if (!cert->get_encoding(cert, CERT_ASN1_DER, &encoding))
|
||||
{
|
||||
error = "encoding certificate failed";
|
||||
goto end;
|
||||
|
||||
@@ -128,8 +128,7 @@ static int req()
|
||||
error = "generating certificate request failed";
|
||||
goto end;
|
||||
}
|
||||
encoding = cert->get_encoding(cert);
|
||||
if (!encoding.ptr)
|
||||
if (!cert->get_encoding(cert, CERT_ASN1_DER, &encoding))
|
||||
{
|
||||
error = "encoding certificate request failed";
|
||||
goto end;
|
||||
|
||||
@@ -193,8 +193,7 @@ static int self()
|
||||
error = "generating certificate failed";
|
||||
goto end;
|
||||
}
|
||||
encoding = cert->get_encoding(cert);
|
||||
if (!encoding.ptr)
|
||||
if (!cert->get_encoding(cert, CERT_ASN1_DER, &encoding))
|
||||
{
|
||||
error = "encoding certificate failed";
|
||||
goto end;
|
||||
|
||||
@@ -314,8 +314,7 @@ static int sign_crl()
|
||||
error = "generating CRL failed";
|
||||
goto error;
|
||||
}
|
||||
encoding = crl->get_encoding(crl);
|
||||
if (!encoding.ptr)
|
||||
if (!crl->get_encoding(crl, CERT_ASN1_DER, &encoding))
|
||||
{
|
||||
error = "encoding CRL failed";
|
||||
goto error;
|
||||
|
||||
Reference in New Issue
Block a user