(pubKey crypto.PublicKey, digest, sig []byte)
| 92 | } |
| 93 | |
| 94 | func rsaVerify(pubKey crypto.PublicKey, digest, sig []byte) error { |
| 95 | switch key := pubKey.(type) { |
| 96 | case *rsa.PublicKey: |
| 97 | return rsa.VerifyPKCS1v15(key, crypto.SHA256, digest, sig) |
| 98 | default: |
| 99 | return fmt.Errorf("unknown public key type: %T", key) |
| 100 | } |
| 101 | } |