提交 809cd0a2 编写于 作者: D Dr. Stephen Henson

print outermost signature algorithm parameters too

上级 bea29921
...@@ -168,12 +168,16 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag) ...@@ -168,12 +168,16 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
if(!(cflag & X509_FLAG_NO_SIGNAME)) if(!(cflag & X509_FLAG_NO_SIGNAME))
{ {
if(X509_signature_print(bp, x->sig_alg, NULL) <= 0)
goto err;
#if 0
if (BIO_printf(bp,"%8sSignature Algorithm: ","") <= 0) if (BIO_printf(bp,"%8sSignature Algorithm: ","") <= 0)
goto err; goto err;
if (i2a_ASN1_OBJECT(bp, ci->signature->algorithm) <= 0) if (i2a_ASN1_OBJECT(bp, ci->signature->algorithm) <= 0)
goto err; goto err;
if (BIO_puts(bp, "\n") <= 0) if (BIO_puts(bp, "\n") <= 0)
goto err; goto err;
#endif
} }
if(!(cflag & X509_FLAG_NO_ISSUER)) if(!(cflag & X509_FLAG_NO_ISSUER))
...@@ -327,8 +331,9 @@ int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig) ...@@ -327,8 +331,9 @@ int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig)
return ameth->sig_print(bp, sigalg, sig, 9, 0); return ameth->sig_print(bp, sigalg, sig, 9, 0);
} }
} }
if (sig)
return X509_signature_dump(bp, sig, 9); return X509_signature_dump(bp, sig, 9);
return 1;
} }
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v) int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v)
......
...@@ -400,8 +400,9 @@ static int rsa_sig_print(BIO *bp, const X509_ALGOR *sigalg, ...@@ -400,8 +400,9 @@ static int rsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
if (!rv) if (!rv)
return 0; return 0;
} }
if (sig)
return X509_signature_dump(bp, sig, indent); return X509_signature_dump(bp, sig, indent);
return 1;
} }
static int rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) static int rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册