-
Notifications
You must be signed in to change notification settings - Fork 2.3k
OpenSSL 3 compatibility #3504
Copy link
Copy link
Closed
Description
I was trying to compile the application with OpenSSL 3 crypto libs, but looks like is it's not compatible.
PKCS12Container::PKCS12Container(std::istream& istr, const std::string& password): _pKey(0)
{
std::ostringstream ostr;
Poco::StreamCopier::copyStream(istr, ostr);
const std::string& cont = ostr.str();
BIO *pBIO = BIO_new_mem_buf(const_cast<char*>(cont.data()), static_cast<int>(cont.size()));
if (pBIO)
{
PKCS12* pPKCS12 = 0;
d2i_PKCS12_bio(pBIO, &pPKCS12);
BIO_free(pBIO);
if (!pPKCS12) throw OpenSSLException("PKCS12Container(istream&, const string&)");
---> load(pPKCS12, password);
}
else
{
<--- throw Poco::NullPointerException("PKCS12Container(istream&, const string&)");
}
}
void PKCS12Container::load(PKCS12* pPKCS12, const std::string& password)
{
if (pPKCS12)
{
X509* pCert = 0;
STACK_OF(X509)* pCA = 0;
---> if (PKCS12_parse(pPKCS12, password.c_str(), &_pKey, &pCert, &pCA))
{
...
}
else
{
PKCS12_free(pPKCS12);
<--- throw OpenSSLException();
}
Unable to parse PKCS#12 container: "error:0308010C:digital envelope routines::unsupported"
Would it be possible to make it compatible also with OpenSSL 3?
Reactions are currently unavailable