...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package sigerrors
18
19 import (
20 "errors"
21 )
22
23 var (
24 ErrExist = errors.New("object already exists in token")
25 )
26
27 type KeyNotFoundError struct{}
28
29 func (KeyNotFoundError) Error() string {
30 return "No object found in token with the specified label"
31 }
32
33 type PinIncorrectError struct{}
34
35 func (PinIncorrectError) Error() string {
36 return "The entered PIN was incorrect"
37 }
38
39 type ErrNoCertificate struct {
40 Type string
41 }
42
43 func (e ErrNoCertificate) Error() string {
44 return "no certificate of type \"" + e.Type + "\" defined for this key"
45 }
46
47 type NotSignedError struct {
48 Type string
49 }
50
51 func (e NotSignedError) Error() string {
52 return e.Type + " contains no signatures"
53 }
54
View as plain text