Check that the self-signed cert is really self-signed.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20908 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -804,6 +804,20 @@ hx509_validate_cert(hx509_context context,
|
|||||||
"Not a CA nor PROXY and doesn't have"
|
"Not a CA nor PROXY and doesn't have"
|
||||||
"CRL Dist Point\n");
|
"CRL Dist Point\n");
|
||||||
|
|
||||||
|
if (status.selfsigned) {
|
||||||
|
ret = _hx509_verify_signature_bitstring(context,
|
||||||
|
c,
|
||||||
|
&c->signatureAlgorithm,
|
||||||
|
&c->tbsCertificate._save,
|
||||||
|
&c->signatureValue);
|
||||||
|
if (ret == 0)
|
||||||
|
validate_print(ctx, HX509_VALIDATE_F_VERBOSE,
|
||||||
|
"Self-signed certificate was self-signed\n");
|
||||||
|
else
|
||||||
|
validate_print(ctx, HX509_VALIDATE_F_VALIDATE,
|
||||||
|
"Self-signed certificate NOT really self-signed!\n");
|
||||||
|
}
|
||||||
|
|
||||||
hx509_name_free(&subject);
|
hx509_name_free(&subject);
|
||||||
hx509_name_free(&issuer);
|
hx509_name_free(&issuer);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user