69,371
社区成员
发帖
与我相关
我的任务
分享
///1.新建BIO对象
bio = BIO_new_mem_buf(pubKey, strlen(pubKey));
if (bio == NULL) {
return iRet;
}
///从BIO中获取公钥
if ((RSAPubKey = PEM_read_bio_RSAPublicKey(bio, NULL, NULL, NULL)) == NULL) {
BIO_free(bio);
return iRet;
}
BIO_free(bio);
typedef struct RSAPrivateKeyStr
{
void *reserved;
Item version;
Item modulus;
Item publicExponent;
Item privateExponent;
Item prime[2];
Item exponent[2];
Item coefficient;
} RSAPrivateKey;
建议网上下一份openssl开源代码瞅瞅就好了