diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2015-09-19 22:40:40 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2015-09-19 22:40:40 -0400 |
commit | 47b7d658b45ec1394edb6806c2667cecee13ff10 (patch) | |
tree | 1cfab8213db00b4f7d8ce7ae5bbf08cea84295c5 /lib/vtls | |
parent | f65e07ca5930a27a54fe96e99e838f6c85c5356b (diff) |
vtls: Change designator name for server's pubkey hash
- Change the designator name we use to show the base64 encoded sha256
hash of the server's public key from 'pinnedpubkey' to
'public key hash'.
Though the server's public key hash is only shown when comparing pinned
public key hashes, the server's hash may not match one of the pinned.
Diffstat (limited to 'lib/vtls')
-rw-r--r-- | lib/vtls/vtls.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index 692ff5c9e..f359cd5d5 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -797,17 +797,15 @@ CURLcode Curl_pin_peer_pubkey(struct SessionHandle *data, return CURLE_OUT_OF_MEMORY; curlssl_sha256sum(pubkey, pubkeylen, sha256sumdigest, SHA256_DIGEST_LENGTH); - encode = Curl_base64_encode(data, (char *)sha256sumdigest, SHA256_DIGEST_LENGTH, &encoded, &encodedlen); Curl_safefree(sha256sumdigest); - if(!encode) { - infof(data, "\t pinnedpubkey: sha256//%s\n", encoded); - } - else + if(encode) return encode; + infof(data, "\t public key hash: sha256//%s\n", encoded); + /* it starts with sha256//, copy so we can modify it */ pinkeylen = strlen(pinnedpubkey) + 1; pinkeycopy = malloc(pinkeylen); |