2025-12-10 17:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/d2i.c
* use HB_SSL_CONST instead of explicit const for some ancient (<0.9.8)
OpenSSL versions
This commit is contained in:
@@ -7,6 +7,11 @@
|
|||||||
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-10 17:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||||
|
* contrib/hbssl/d2i.c
|
||||||
|
* use HB_SSL_CONST instead of explicit const for some ancient (<0.9.8)
|
||||||
|
OpenSSL versions
|
||||||
|
|
||||||
2025-12-10 16:29 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
2025-12-10 16:29 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||||
* contrib/hbssl/evpmd.c
|
* contrib/hbssl/evpmd.c
|
||||||
* contrib/hbssl/hbssl.h
|
* contrib/hbssl/hbssl.h
|
||||||
|
|||||||
@@ -54,11 +54,10 @@
|
|||||||
|
|
||||||
HB_FUNC( D2I_PUBKEY )
|
HB_FUNC( D2I_PUBKEY )
|
||||||
{
|
{
|
||||||
const unsigned char * pszKeyDer = ( const unsigned char * ) hb_parc( 1 );
|
HB_SSL_CONST unsigned char * pszKeyDer = ( HB_SSL_CONST unsigned char * ) hb_parc( 1 );
|
||||||
|
|
||||||
if( pszKeyDer )
|
if( pszKeyDer )
|
||||||
{
|
{
|
||||||
// EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
|
|
||||||
EVP_PKEY * pKey = d2i_PUBKEY( NULL, &pszKeyDer, ( long ) hb_parclen( 1 ) );
|
EVP_PKEY * pKey = d2i_PUBKEY( NULL, &pszKeyDer, ( long ) hb_parclen( 1 ) );
|
||||||
if( pKey )
|
if( pKey )
|
||||||
hb_EVP_PKEY_ret( pKey );
|
hb_EVP_PKEY_ret( pKey );
|
||||||
@@ -71,11 +70,10 @@ HB_FUNC( D2I_PUBKEY )
|
|||||||
|
|
||||||
HB_FUNC( D2I_RSAPUBLICKEY )
|
HB_FUNC( D2I_RSAPUBLICKEY )
|
||||||
{
|
{
|
||||||
const unsigned char * pszKeyDer = ( const unsigned char * ) hb_parc( 1 );
|
HB_SSL_CONST unsigned char * pszKeyDer = ( HB_SSL_CONST unsigned char * ) hb_parc( 1 );
|
||||||
|
|
||||||
if( pszKeyDer )
|
if( pszKeyDer )
|
||||||
{
|
{
|
||||||
// RSA * rsa = d2i_RSAPublicKey(RSA **k, &p, pklen)
|
|
||||||
RSA * pKey = d2i_RSAPublicKey( NULL, &pszKeyDer, ( long ) hb_parclen( 1 ) );
|
RSA * pKey = d2i_RSAPublicKey( NULL, &pszKeyDer, ( long ) hb_parclen( 1 ) );
|
||||||
if( pKey )
|
if( pKey )
|
||||||
hb_RSA_ret( pKey );
|
hb_RSA_ret( pKey );
|
||||||
@@ -88,11 +86,10 @@ HB_FUNC( D2I_RSAPUBLICKEY )
|
|||||||
|
|
||||||
HB_FUNC( D2I_X509 )
|
HB_FUNC( D2I_X509 )
|
||||||
{
|
{
|
||||||
const unsigned char * pszCrtDer = ( const unsigned char * ) hb_parc( 1 );
|
HB_SSL_CONST unsigned char * pszCrtDer = ( HB_SSL_CONST unsigned char * ) hb_parc( 1 );
|
||||||
|
|
||||||
if( pszCrtDer )
|
if( pszCrtDer )
|
||||||
{
|
{
|
||||||
// RSA * rsa = d2i_RSAPublicKey(RSA **k, &p, pklen)
|
|
||||||
X509 * x509 = d2i_X509( NULL, &pszCrtDer, ( long ) hb_parclen( 1 ) );
|
X509 * x509 = d2i_X509( NULL, &pszCrtDer, ( long ) hb_parclen( 1 ) );
|
||||||
if( x509 )
|
if( x509 )
|
||||||
hb_X509_ret( x509 );
|
hb_X509_ret( x509 );
|
||||||
|
|||||||
Reference in New Issue
Block a user