crypto: reorg, cleanup and add function for generating CRLs.
This change moves a number of common PKIX structures into crypto/x509/pkix, from where x509, and ocsp can reference them, saving duplication. It also removes x509/crl and merges it into x509 and x509/pkix. x509 is changed to take advantage of the big.Int support that now exists in asn1. Because of this, the public/private key pair in http/httptest/server.go had to be updated because it was serialised with an old version of the code that didn't zero pad ASN.1 INTEGERs. R=bradfitz, rsc CC=golang-dev https://golang.org/cl/4532115
This commit is contained in:
parent
1b7f4ea6c3
commit
5a4918e635
2
tls.go
2
tls.go
@ -159,7 +159,7 @@ func X509KeyPair(certPEMBlock, keyPEMBlock []byte) (cert Certificate, err os.Err
|
|||||||
|
|
||||||
key, err := x509.ParsePKCS1PrivateKey(keyDERBlock.Bytes)
|
key, err := x509.ParsePKCS1PrivateKey(keyDERBlock.Bytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = os.ErrorString("crypto/tls: failed to parse key")
|
err = os.ErrorString("crypto/tls: failed to parse key: " + err.String())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user