There is a known OpenSSL bug that affects included libraries, see more for information: openssl/openssl#20497
EVP_PKEY_get_id(LPubKey) might return -1, which OBJ_nid2sn() can not handle:
We need to replace following code in Net.OpenSSL.pas > TSSLTools.GetCertInfo:
ACertInfo.PubKeyID := EVP_PKEY_get_id(LPubKey);
ACertInfo.PubKeyType := UTF8ToString(OBJ_nid2sn(ACertInfo.PubKeyID));
With this code:
ACertInfo.PubKeyID := EVP_PKEY_get_id(LPubKey);
ACertInfo.PubKeyType := UTF8ToString(EVP_PKEY_get0_type_name(LPubKey));
Also same needs to be done in Net.OpenSSL.pas > TSSLTools.GetSslInfo.
EVP_PKEY_get0_type_name declaration is following:
EVP_PKEY_get0_type_name: function(key: PEVP_PKEY): PAnsiChar; cdecl;
There is a known OpenSSL bug that affects included libraries, see more for information: openssl/openssl#20497
EVP_PKEY_get_id(LPubKey)might return -1, whichOBJ_nid2sn()can not handle:We need to replace following code in
Net.OpenSSL.pas > TSSLTools.GetCertInfo:With this code:
Also same needs to be done in
Net.OpenSSL.pas > TSSLTools.GetSslInfo.EVP_PKEY_get0_type_namedeclaration is following: