crypto/openpgp: minor updates to subpackages

Now that packet/ is checked in, we can add its Makefile. Also, a couple
of updates to error/ and s2k/ for bugfixes and to use the new crypto
package.

R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4179043
This commit is contained in:
Adam Langley 2011-02-11 08:34:19 -05:00
parent 047b023119
commit 4ee90b764e
3 changed files with 82 additions and 28 deletions

View file

@ -5,6 +5,10 @@
// This package contains common error types for the OpenPGP packages.
package error
import (
"strconv"
)
// A StructuralError is returned when OpenPGP data is found to be syntactically
// invalid.
type StructuralError string
@ -44,3 +48,17 @@ func (ki keyIncorrect) String() string {
}
var KeyIncorrectError = keyIncorrect(0)
type unknownIssuer int
func (unknownIssuer) String() string {
return "signature make by unknown entity"
}
var UnknownIssuerError = unknownIssuer(0)
type UnknownPacketTypeError uint8
func (upte UnknownPacketTypeError) String() string {
return "unknown OpenPGP packet type: " + strconv.Itoa(int(upte))
}