Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
SeanBurford 2b8f0970a8 openpgp: Handle signatures that have multiple signature packets
Fixes #12242

Change-Id: Ie40e84bc9e7db390219d85a7eddea99accb19cb8
Reviewed-on: https://go-review.googlesource.com/13781
Reviewed-by: Adam Langley <agl@golang.org>
2015-08-29 22:14:55 +00:00
KB Sriram 24ffb5feb3 x/crypto/openpgp: Limit packet recursion depth.
A carefully crafted packet can cause the packet reader to push an
infinite number of recursive packet readers. This change limits
the number of recursive parsing levels within the packet reader.

More details at:
http://mumble.net/~campbell/misc/pgp-quine
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402

Fixes #10751

Change-Id: Ib4e102d85f6496e2c7feb5b9d7e5db45db6032df
Reviewed-on: https://go-review.googlesource.com/9843
Reviewed-by: Adam Langley <agl@golang.org>
2015-05-08 01:16:24 +00:00
David Symonds 1fbbd62cfe crypto: add import comments.
Change-Id: I33240faf1b8620d0cd600de661928d8e422ebdbc
Reviewed-on: https://go-review.googlesource.com/1235
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 23:26:36 +00:00
Andrew Gerrand a73c6bbfc5 go.crypto: use golang.org/x/... import paths
LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/167190043
2014-11-10 08:50:25 +11:00
Adam Langley 3092f0d93b go.crypto/openpgp: return signature error rather than unknown issuer.
In the event that a detached signature fails to verify, the code would
continue trying to find other keys with the same key ID and eventually
conclude that the signature was issued by someone unknown
(ErrUnknownIssuer).

With this change, the signature verification error would be returned
instead. (Technically the last error if several keys had a matching key
id and neither verified.)

Fixes golang/go#8509.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/125030043
2014-08-11 15:41:56 -07:00
Adam Langley aeb0262c11 go.crypto/openpgp: fix hash presence checks.
At some point in the distant past, crypto.Hash.New() changed from
returning nil when a hash function wasn't provided, to panicing. Some
of the code in openpgp predates this and was still using the nil check.

LGTM=bradfitz
R=sburford, bradfitz
CC=golang-codereviews
https://golang.org/cl/104850045
2014-06-04 11:40:03 -07:00
Adam Langley aa3adaf1aa go.crypto/openpgp: check for revoked keys.
R=agl
CC=golang-codereviews
https://golang.org/cl/95050043
2014-05-05 11:41:50 -07:00
Adam Langley 7bb6c099c0 go.crypto/openpgp: support v3 detached signatures.
Although the package doesn't attempt to fully support ancient, version
3 messages, supporting v3 detached signatures is fairly easy and some
projects (in this case, Ubuntu) are using them for unknown reasons.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14590043
2013-10-09 17:24:09 -04:00
Adam Langley 54eafe1dea openpgp: eliminate implicit rand.Reader and time.Now
Fixes golang/go#2501.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5653067
2012-02-20 10:48:21 -05:00
Russ Cox 470549d502 go.crypto: initial code
Manual edits to README.
Moved from main Go repository, deleted Makefiles, ran gofix -r go1rename.

Tested with: go test code.google.com/p/go.crypto/...

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5564059
2012-01-25 15:31:12 -05:00