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

Function GeneratePublicKeyStrDer

be/src/kudu/security/token-test.cc:118–127  ·  view source on GitHub ↗

Generate public key as a string in DER format for tests.

Source from the content-addressed store, hash-verified

116
117// Generate public key as a string in DER format for tests.
118Status GeneratePublicKeyStrDer(string* ret) {
119 PrivateKey private_key;
120 RETURN_NOT_OK(GeneratePrivateKey(kNumBits, &private_key));
121 PublicKey public_key;
122 RETURN_NOT_OK(private_key.GetPublicKey(&public_key));
123 string public_key_str_der;
124 RETURN_NOT_OK(public_key.ToString(&public_key_str_der, DataFormat::DER));
125 *ret = public_key_str_der;
126 return Status::OK();
127}
128
129// Generate token signing key with the specified parameters.
130Status GenerateTokenSigningKey(int64_t seq_num,

Callers 1

TEST_FFunction · 0.85

Calls 4

GeneratePrivateKeyFunction · 0.85
OKFunction · 0.85
GetPublicKeyMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected