1
0
mirror of https://github.com/golang/go synced 2024-10-05 07:11:22 -06:00
go/src/crypto/x509
Adam Langley 4ec946ce95 crypto/x509: don't panic when decrypting invalid PEM data.
If an encrypted PEM block contained ciphertext that was not a multiple
of the block size then the code would panic. This change tests for that
case and returns an error.

Fixes #11215.

Change-Id: I7b700f99e20810c4f545519b1e9d766b4640e8a7
Reviewed-on: https://go-review.googlesource.com/11097
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-06-26 16:16:51 +00:00
..
pkix crypto/x509/pkix: Parse and add additional elements in a DN 2015-02-03 21:56:08 +00:00
cert_pool.go all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
example_test.go
pem_decrypt_test.go crypto/x509: don't panic when decrypting invalid PEM data. 2015-06-26 16:16:51 +00:00
pem_decrypt.go crypto/x509: don't panic when decrypting invalid PEM data. 2015-06-26 16:16:51 +00:00
pkcs1.go
pkcs8_test.go
pkcs8.go
root_bsd.go crypto/x509: split certFiles definition by GOOS 2015-01-05 05:41:27 +00:00
root_cgo_darwin.go crypto/x509: build the builtin root certs also for darwin/arm64 2015-04-16 16:50:30 +00:00
root_darwin_arm_gen.go crypto/x509: build the builtin root certs also for darwin/arm64 2015-04-16 16:50:30 +00:00
root_darwin_armx.go crypto/x509: build the builtin root certs also for darwin/arm64 2015-04-16 16:50:30 +00:00
root_darwin_test.go crypto/x509: skip arm64 tests limited by iOS 2015-04-13 11:55:32 +00:00
root_darwin.go crypto/x509: build the builtin root certs also for darwin/arm64 2015-04-16 16:50:30 +00:00
root_linux.go crypto/x509: split certFiles definition by GOOS 2015-01-05 05:41:27 +00:00
root_nacl.go crypto/x509: fix nacl build 2015-01-05 06:31:49 +00:00
root_nocgo_darwin.go
root_plan9.go
root_solaris.go crypto/x509: add cert SmartOS cert path 2015-01-14 05:07:37 +00:00
root_unix.go crypto/x509: split certFiles definition by GOOS 2015-01-05 05:41:27 +00:00
root_windows.go
root.go
sec1_test.go
sec1.go crypto/ecdsa, crypto/x509: update SEC1 ECC link in comments 2015-06-26 16:08:22 +00:00
sha2_windows_test.go crypto/x509: use syscall.GetVersion instead of internal/syscall/windows.GetVersion 2015-03-31 08:11:24 +00:00
verify_test.go crypto/x509: skip SHA2 system verify test if not supported. 2015-03-30 15:58:08 +00:00
verify.go crypto/x509: allow parsing of certificates with unknown critical extensions. 2015-04-28 16:32:09 +00:00
x509_test_import.go
x509_test.go all: extract "can I exec?" check from tests into internal/testenv 2015-06-16 18:07:36 +00:00
x509.go crypto/x509: be strict about trailing data. 2015-04-30 03:49:36 +00:00