]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: better error messages when PEM inputs are switched.
authorAdam Langley <agl@golang.org>
Sun, 30 Aug 2015 17:23:30 +0000 (10:23 -0700)
committerAdam Langley <agl@golang.org>
Wed, 30 Sep 2015 00:27:46 +0000 (00:27 +0000)
commitbe16001187f17e9c312e69c353be743cc7d9e260
tree0e68ca5a64a9bcad94d109d4d41eb04d16630892
parent7e1d1f899cbfb302447324e96da0e913ef94096c
crypto/tls: better error messages when PEM inputs are switched.

This change causes the types of skipped PEM blocks to be recorded when
no certificate or private-key data is found in a PEM input. This allows
for better error messages to be return in the case of common errors like
switching the certifiate and key inputs to X509KeyPair.

Fixes #11092

Change-Id: Ifc155a811cdcddd93b5787fe16a84c972011f2f7
Reviewed-on: https://go-review.googlesource.com/14054
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/tls/tls.go
src/crypto/tls/tls_test.go