MCPcopy Create free account
hub / github.com/Icinga/icinga2 / CertificateToString

Function CertificateToString

lib/base/tlsutility.cpp:878–891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

876}
877
878String CertificateToString(X509* cert)
879{
880 BIO *mem = BIO_new(BIO_s_mem());
881 PEM_write_bio_X509(mem, cert);
882
883 char *data;
884 long len = BIO_get_mem_data(mem, &data);
885
886 String result = String(data, data + len);
887
888 BIO_free(mem);
889
890 return result;
891}
892
893std::shared_ptr<X509> StringToCertificate(const String& cert)
894{

Callers 7

VerifyCertificateFunction · 0.70
WriteCertMethod · 0.50
RenewOwnCertMethod · 0.50
RenewCAMethod · 0.50
RunMethod · 0.50

Calls 1

StringClass · 0.70

Tested by

no test coverage detected