当需要编程加载der证书的时候 可以这样
unsigned char buf2[1024]={0}; FILE* fp = fopen("d:/test.der", "rb"); int n = fread(buf2, 1, 1024, fp); buf2[n] = 0; unsigned char* p=buf2; X509* m_pX509_1 =d2i_X509(NULL, (const unsigned char **)&p, n); fclose(fp);
标签:fp,der,buf2,openssl,C++,unsigned,char,加载 From: https://www.cnblogs.com/yuandaozhe/p/16619683.html