mirror of
https://github.com/golang/go.git
synced 2025-11-10 05:31:03 +00:00
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:
parent
047b023119
commit
4ee90b764e
3 changed files with 82 additions and 28 deletions
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue