Skip to content

Commit

Permalink
Use the same error message for full primitive and legacy primitives i…
Browse files Browse the repository at this point in the history
…n signature factories

PiperOrigin-RevId: 698346893
Change-Id: I2cb2a2d11427652b87b0b947ffbd3607588f00de
  • Loading branch information
morambro authored and copybara-github committed Nov 20, 2024
1 parent 7ee4492 commit 891c2cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion signature/signer_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func extractFullSigner(entry *primitiveset.Entry) (tink.Signer, error) {
if entry.FullPrimitive != nil {
p, ok := (entry.FullPrimitive).(tink.Signer)
if !ok {
return nil, fmt.Errorf("public_key_sign_factory: not a Signer full primitive")
return nil, fmt.Errorf("public_key_sign_factory: not a Signer primitive")
}
return p, nil
}
Expand Down
2 changes: 1 addition & 1 deletion signature/verifier_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func extractFullVerifier(entry *primitiveset.Entry) (tink.Verifier, error) {
if entry.FullPrimitive != nil {
p, ok := (entry.FullPrimitive).(tink.Verifier)
if !ok {
return nil, fmt.Errorf("verifier_factory: not a Verifier full primitive")
return nil, fmt.Errorf("verifier_factory: not a Verifier primitive")
}
return p, nil
}
Expand Down

0 comments on commit 891c2cc

Please sign in to comment.