Hi, I am unable to write to a file using PEM_write_X509. Im running my program on linux. The functions works when the file pointer is stdout. It fails when any other valid file pointer is used. This is the same problem with BIO_printf. If the output BIO is stdout it works but do...
std::stringexportToPem(X509 *x509){std::stringbio;if(!x509)returnbio; BIO *bioMem = BIO_new(BIO_s_mem());if(!PEM_write_bio_X509(bioMem, x509)) {// error}else{char*thePem;intpemLength = BIO_get_mem_data(bioMem, &thePem); bio =std::string(thePem, thePem + pemLength); }...
std::stringexportToPem(X509 *x509){std::stringbio;if(!x509)returnbio; BIO *bioMem = BIO_new(BIO_s_mem());if(!PEM_write_bio_X509(bioMem, x509)) {// error}else{char*thePem;intpemLength = BIO_get_mem_data(bioMem, &thePem); bio =std::string(thePem, thePem + pemLength); }...