openssl
yu_sn0w
这个作者很懒,什么都没留下…
展开
-
解析URL的域名证书
可以通过 openssl 获取常规的,但是部分网站获取不正确。// 请使用 CertFreeCertificateContext 释放 *p_contextvoid GetCertFromDomain(const wchar_t* domain, int nPort, CERT_CONTEXT** p_context){ if (NULL == domain || NULL == p_context) { return; } static HINTERNET hsession = NU原创 2020-06-28 14:01:32 · 619 阅读 · 0 评论 -
利用 openssl 加解密
std::string EncryptByOpenSSL(const std::string& str, const EVP_CIPHER* evp, const unsigned char* key, const unsigned char* iv, bool bEncrypt){ std::string strCipher1; { BIO* bio = BIO_new(B...原创 2020-04-14 14:16:53 · 359 阅读 · 1 评论 -
使用 openssl 的 RSA 加解密测试及总结
先看代码void MyRSA_Test(RSA *rsa, bool bUsePublicEncrypt, int padding){ unsigned char plain[512] = "Hello world!"; unsigned char cipper[512] = { 0 }; unsigned char newplain[512] = { 0 }; int outl ...原创 2020-04-13 10:52:24 · 811 阅读 · 0 评论