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:
Adam Langley 2011-06-06 10:35:46 -04:00
parent 1b7f4ea6c3
commit 5a4918e635

2
tls.go
View File

@ -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
} }