FAQ
https://codereview.appspot.com/6767045/diff/8001/src/pkg/crypto/x509/sec1.go
File src/pkg/crypto/x509/sec1.go (right):

https://codereview.appspot.com/6767045/diff/8001/src/pkg/crypto/x509/sec1.go#newcode32
src/pkg/crypto/x509/sec1.go:32: func ParseSEC1PrivateKey(der []byte)
(key *ecdsa.PrivateKey, err error) {
On 2012/10/25 15:20:58, jsing wrote:
On 2012/10/25 14:19:03, agl1 wrote:
Where is this format from? It's odd to have two ASN.1 values
concatenated,
rather than in a SEQUENCE and SEC1 C.2 doesn't seem to specify this
format.
Agreed. It appears that 'openssl ecparam' writes out an
ECDomainParameters
immediately followed by the ECPrivateKey structure. This is similar to what it
does in the PEM case, where there are two PEM blocks in the same file
(the first
an 'EC PARAMS' block, the second an 'EC PRIVATE KEY' block). In the case of a
named curve, the ASN.1 can simply be an OID. I'm not entirely sure how we should
handle this...
I don't think that we should handle it. I think it's basically a problem
with OpenSSL. It makes sense in the PEM case, but it's nonsense for DER.

If we eliminate this method, we can remove the current ParseECPrivateKey
wrapper too, right?

https://codereview.appspot.com/6767045/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 29, '12 at 1:54p
activeOct 29, '12 at 1:54p
posts1
users1
websitegolang.org

1 user in discussion

Agl: 1 post

People

Translate

site design / logo © 2022 Grokbase