Commit 7748a7f1 authored by Adam Langley's avatar Adam Langley

crypto/x509: unwrap Subject Key Identifier

RFC 5280, 4.2.1.2 says:
  SubjectKeyIdentifier ::= KeyIdentifier
  KeyIdentifier ::= OCTET STRING

Previously, we were failing to unwrap the second level of OCTET STRING
encoding.

Fixes #993.

R=rsc
CC=golang-dev
https://golang.org/cl/1917044
parent 3f19d8ae
......@@ -610,7 +610,12 @@ func parseCertificate(in *certificate) (*Certificate, os.Error) {
case 14:
// RFC 5280, 4.2.1.2
out.SubjectKeyId = e.Value
var keyid []byte
_, err = asn1.Unmarshal(&keyid, e.Value)
if err != nil {
return nil, err
}
out.SubjectKeyId = keyid
continue
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment