| 876 | } |
| 877 | |
| 878 | String 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 | |
| 893 | std::shared_ptr<X509> StringToCertificate(const String& cert) |
| 894 | { |
no test coverage detected