Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(35)

Issue 5416059: code review 5416059: crypto/x509, crypto/tls: support PKCS#8 private keys. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by agl1
Modified:
13 years, 3 months ago
Reviewers:
CC:
bradfitz, golang-dev
Visibility:
Public.

Description

crypto/x509, crypto/tls: support PKCS#8 private keys. OpenSSL 1.0.0 has switched to generating PKCS#8 format private keys by default. This change allows http.ListenAndServeTLS to work with either types of keys. See http://groups.google.com/group/golang-nuts/browse_thread/thread/84715b5f0c9e3c30/63a8a27b53e102a6

Patch Set 1 #

Patch Set 2 : diff -r f754c9eb88cf https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r f754c9eb88cf https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r f754c9eb88cf https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 5 : diff -r d1853f7ec1c7 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -4 lines) Patch
M src/pkg/crypto/tls/tls.go View 1 1 chunk +15 lines, -4 lines 0 comments Download
M src/pkg/crypto/x509/Makefile View 1 1 chunk +1 line, -0 lines 0 comments Download
A src/pkg/crypto/x509/pkcs8.go View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
A src/pkg/crypto/x509/pkcs8_test.go View 1 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 3
agl1
Hello bradfitz@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 3 months ago (2011-11-21 16:09:14 UTC) #1
bradfitz
LGTM http://codereview.appspot.com/5416059/diff/5001/src/pkg/crypto/x509/pkcs8.go File src/pkg/crypto/x509/pkcs8.go (right): http://codereview.appspot.com/5416059/diff/5001/src/pkg/crypto/x509/pkcs8.go#newcode37 src/pkg/crypto/x509/pkcs8.go:37: return nil, errors.New("crypto/x509: PKCS#8 wrapping contained private key ...
13 years, 3 months ago (2011-11-21 16:23:25 UTC) #2
agl1
13 years, 3 months ago (2011-11-21 19:18:51 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=4bec71996c9f ***

crypto/x509, crypto/tls: support PKCS#8 private keys.

OpenSSL 1.0.0 has switched to generating PKCS#8 format private keys by
default. This change allows http.ListenAndServeTLS to work with either
types of keys.

See
http://groups.google.com/group/golang-nuts/browse_thread/thread/84715b5f0c9e3...

R=bradfitz
CC=golang-dev
http://codereview.appspot.com/5416059

http://codereview.appspot.com/5416059/diff/5001/src/pkg/crypto/x509/pkcs8.go
File src/pkg/crypto/x509/pkcs8.go (right):

http://codereview.appspot.com/5416059/diff/5001/src/pkg/crypto/x509/pkcs8.go#...
src/pkg/crypto/x509/pkcs8.go:37: return nil, errors.New("crypto/x509: PKCS#8
wrapping contained private key with unknown algorithm")
On 2011/11/21 16:23:26, bradfitz wrote:
> Your call, but I'd include the number here. Will inevitably save you email
> exchanges in the future. Then use fmt.Errorf here and on line 33?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b