Check input/output of RSA private keys in PEM format.
| 93 | |
| 94 | // Check input/output of RSA private keys in PEM format. |
| 95 | TEST_F(CryptoTest, RsaPrivateKeyInputOutputPEM) { |
| 96 | PrivateKey key; |
| 97 | ASSERT_OK(key.FromFile(private_key_file_, DataFormat::PEM)); |
| 98 | string key_str; |
| 99 | ASSERT_OK(key.ToString(&key_str, DataFormat::PEM)); |
| 100 | RemoveExtraWhitespace(&key_str); |
| 101 | |
| 102 | string ref_key_str(kCaPrivateKey); |
| 103 | RemoveExtraWhitespace(&ref_key_str); |
| 104 | EXPECT_EQ(ref_key_str, key_str); |
| 105 | } |
| 106 | |
| 107 | // Check input of corrupted RSA private keys in PEM format. |
| 108 | TEST_F(CryptoTest, CorruptedRsaPrivateKeyInputPEM) { |
nothing calls this directly
no test coverage detected