(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func loadTestKeyPair(t *testing.T) (*x509.Certificate, interface{}) { |
| 17 | t.Helper() |
| 18 | b, _ := pem.Decode(golden.Get(t, "cert.cert")) |
| 19 | cert, err := x509.ParseCertificate(b.Bytes) |
| 20 | assert.NilError(t, err) |
| 21 | kb, _ := pem.Decode(golden.Get(t, "cert.key")) |
| 22 | key, err := x509.ParsePKCS8PrivateKey(kb.Bytes) |
| 23 | assert.NilError(t, err) |
| 24 | return cert, key |
| 25 | } |
| 26 | |
| 27 | // TestEncryptedKeyRefusesBlockCipher checks that an EncryptedKey naming a |
| 28 | // block cipher is refused, so that a captured content key cannot be nested |
no test coverage detected