MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / pkey

Function pkey

src/crypto.cpp:353–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351 }
352
353 pkey_t pkey(const std::string_view &k) {
354 bio_t io {BIO_new(BIO_s_mem())};
355
356 BIO_write(io.get(), k.data(), k.size());
357
358 pkey_t p = nullptr;
359 PEM_read_bio_PrivateKey(io.get(), &p, nullptr, nullptr);
360
361 return p;
362 }
363
364 std::string pem(x509_t &x509) {
365 bio_t bio {BIO_new(BIO_s_mem())};

Callers 1

serverchallengerespFunction · 0.85

Calls 3

getMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected