-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
Description
When FindKey methods return an empty (nil) key, they should return an error Error: could not find a key with ID and Label ..., and not return nil, nil.
This should be modified in the following methods:
Lines 246 to 261 in 9fba4fe
func (c *Context) FindKeyPair(id []byte, label []byte) (Signer, error) { if c.closed.Get() { return nil, errClosed } result, err := c.FindKeyPairs(id, label) if err != nil { return nil, err } if len(result) == 0 { return nil, nil } return result[0], nil } Line 303 in 9fba4fe
func (c *Context) FindKeyPairWithAttributes(attributes AttributeSet) (Signer, error) { Line 398 in 9fba4fe
func (c *Context) FindKey(id []byte, label []byte) (*SecretKey, error) { Line 446 in 9fba4fe
func (c *Context) FindKeyWithAttributes(attributes AttributeSet) (*SecretKey, error) { Line 561 in 9fba4fe
func (c *Context) FindPrivateKey(id []byte, label []byte) (PrivateKey, error) { Line 610 in 9fba4fe
func (c *Context) FindPrivateKeyWithAttributes(attributes AttributeSet) (PrivateKey, error) { Line 213 in 9fba4fe
func (c *Context) FindRSAPrivateKey(id []byte, label []byte) (RSAPrivateKey, error) { Line 345 in 9fba4fe
func (c *Context) FindRSAKeyPair(id []byte, label []byte) (SignerDecrypter, error) {
Reactions are currently unavailable