Sorry, please ignore, that reply was for a different thread started by Jeff.
On 16/01/2013, at 6:37, Dave Cheney wrote:

From memory there is an alias for each combination, after sourcing the file tab completion should give you a hint. This is from memory, I need to update it for the new platforms coming online for go-1.1
On 16/01/2013, at 3:31, "Jeff R. Allen" wrote:

The error you are getting is "crypto/tls: failed to parse certificate PEM data". It comes from here:

func X509KeyPair(certPEMBlock, keyPEMBlock []byte) (cert Certificate, err error) {
var certDERBlock *pem.Block
for {
certDERBlock, certPEMBlock = pem.Decode(certPEMBlock)
if certDERBlock == nil {
if certDERBlock.Type == "CERTIFICATE" {
cert.Certificate = append(cert.Certificate, certDERBlock.Bytes)

if len(cert.Certificate) == 0 {
err = errors.New("crypto/tls: failed to parse certificate PEM data")

because your certificate has a different PEM header than Go is expecting (it expects "BEGIN CERTIFICATE", yours says "BEGIN TRUSTED CERTIFICATE").

I started looking into why your cert says that, what happens if you hack it to make Go look at it anyway, etc, but I'm out of time right now. Perhaps this reply will nudge you in the right direction anyway. :)


Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 9 | next ›
Discussion Overview
groupgolang-nuts @
postedJan 14, '13 at 8:12a
activeJan 16, '13 at 11:39a



site design / logo © 2021 Grokbase