mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-17 07:13:27 +02:00
ifdef signature algorithm for older openssl versions
This commit is contained in:
parent
6121d55819
commit
4e4fed8965
@ -22,7 +22,12 @@
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0907000L
|
||||
#include <openssl/conf.h>
|
||||
#endif
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#pragma message (OPENSSL_VERSION_TEXT)
|
||||
#elif defined (POCO_COMPILER_GCC)
|
||||
#pragma message OPENSSL_VERSION_TEXT
|
||||
// clang?
|
||||
#endif
|
||||
|
||||
using Poco::RandomInputStream;
|
||||
using Poco::Thread;
|
||||
|
@ -311,7 +311,15 @@ bool X509Certificate::equals(const X509Certificate& otherCertificate) const
|
||||
|
||||
std::string X509Certificate::signatureAlgorithm() const
|
||||
{
|
||||
int sigNID = X509_get_signature_nid(_pCert);
|
||||
int sigNID = NID_undef;
|
||||
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL)
|
||||
sigNID = X509_get_signature_nid(_pCert);
|
||||
#else
|
||||
poco_check_ptr(_pCert->sig_alg);
|
||||
sigNID = OBJ_obj2nid(_pCert->sig_alg->algorithm);
|
||||
#endif
|
||||
|
||||
if (sigNID != NID_undef)
|
||||
{
|
||||
const char* pAlgName = OBJ_nid2ln(sigNID);
|
||||
|
Loading…
x
Reference in New Issue
Block a user