2025-12-21 12:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/hbssl/x509.c
    ! fixed compilation with OpenSSL < 1.1
This commit is contained in:
Przemysław Czerpak
2025-12-21 12:06:50 +01:00
parent ddf295b16b
commit 1b7295c81b
2 changed files with 8 additions and 1 deletions

View File

@@ -7,6 +7,10 @@
Entries may not always be in chronological/commit order. Entries may not always be in chronological/commit order.
See license at the end of file. */ See license at the end of file. */
2025-12-21 12:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/x509.c
! fixed compilation with OpenSSL < 1.1
2025-12-21 10:45 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) 2025-12-21 10:45 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/hbssl.hbx * contrib/hbssl/hbssl.hbx
* contrib/hbssl/evppkey.c * contrib/hbssl/evppkey.c

View File

@@ -162,12 +162,15 @@ HB_FUNC( X509_GET_SERIALNUMBER )
if( x509 ) if( x509 )
{ {
ASN1_INTEGER * a = X509_get_serialNumber( x509 ); ASN1_INTEGER * a = X509_get_serialNumber( x509 );
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
int64_t r = 0; int64_t r = 0;
if( ASN1_INTEGER_get_int64( &r, a ) > 0 ) if( ASN1_INTEGER_get_int64( &r, a ) > 0 )
hb_retnint( r ); hb_retnint( r );
else else
hb_retni( -1 ); hb_retni( -1 );
#else
hb_retnint( ASN1_INTEGER_get( a ) );
#endif
} }
} }
else else