MCPcopy Create free account
hub / github.com/apache/impala / TEST_F

Function TEST_F

be/src/kudu/security/crypto-test.cc:95–105  ·  view source on GitHub ↗

Check input/output of RSA private keys in PEM format.

Source from the content-addressed store, hash-verified

93
94// Check input/output of RSA private keys in PEM format.
95TEST_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.
108TEST_F(CryptoTest, CorruptedRsaPrivateKeyInputPEM) {

Callers

nothing calls this directly

Calls 11

RemoveExtraWhitespaceFunction · 0.85
GenerateNonceFunction · 0.85
MakeSignatureMethod · 0.80
Base64EncodeFunction · 0.50
Base64DecodeFunction · 0.50
FromFileMethod · 0.45
ToStringMethod · 0.45
FromStringMethod · 0.45
GetPublicKeyMethod · 0.45
VerifySignatureMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected