MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / write_bio_to_string

Function write_bio_to_string

include/jwt-cpp/jwt.h:514–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512
513 template<typename error_category = error::rsa_error>
514 std::string write_bio_to_string(std::unique_ptr<BIO, decltype(&BIO_free_all)>& bio_out, std::error_code& ec) {
515 char* ptr = nullptr;
516 auto len = BIO_get_mem_data(bio_out.get(), &ptr);
517 if (len <= 0 || ptr == nullptr) {
518 ec = error_category::convert_to_pem_failed;
519 return {};
520 }
521 return {ptr, static_cast<size_t>(len)};
522 }
523
524 inline std::unique_ptr<EVP_MD_CTX, void (*)(EVP_MD_CTX*)> make_evp_md_ctx() {
525 return

Callers 1

convert_der_to_pemFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected