libsec: implement SPKI fingerprinting for okCertificate()
Instead of only using a hash over the whole certificate for white/black-listing, now we can also use a hash over the Subject Public Key Info (SPKI) field of the certificate which contians the public key algorithm and the public key itself. This allows certificates to be renewed independendtly of the public key. X509dump() now prints the public key thumbprint in addition to the certificate thumbprint. tlsclient will print the certificate when run with -D flag. okCertificate() will print the public key thumbprint in its error string when no match has been found.
This commit is contained in:
parent
b42d441a23
commit
57f8b6ec75
6 changed files with 52 additions and 4 deletions
|
@ -382,7 +382,9 @@ int pkcs1unpadbuf(uchar *buf, int len, mpint *modulus, int blocktype);
|
|||
int asn1encodeRSApub(RSApub *pk, uchar *buf, int len);
|
||||
int asn1encodedigest(DigestState* (*fun)(uchar*, ulong, uchar*, DigestState*),
|
||||
uchar *digest, uchar *buf, int len);
|
||||
|
||||
|
||||
int X509digestSPKI(uchar *, int, DigestState* (*)(uchar*, ulong, uchar*, DigestState*), uchar *);
|
||||
|
||||
/*
|
||||
* elgamal
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue