2025-03-25 13:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/hbcurl/core.c
    ! pacified warnings

  * contrib/hbssl/ssl.c
  * contrib/hbssl/sslctx.c
    ! use 64-bit integers in SSL_[CTX]_[s|g]et_options() for OpenSSL >= 3.0
This commit is contained in:
Przemysław Czerpak
2025-03-25 13:54:05 +01:00
parent 9e783a1319
commit 81be99f647
4 changed files with 24 additions and 4 deletions

View File

@@ -7,6 +7,14 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */
2025-03-25 13:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
! pacified warnings
* contrib/hbssl/ssl.c
* contrib/hbssl/sslctx.c
! use 64-bit integers in SSL_[CTX]_[s|g]et_options() for OpenSSL >= 3.0
2025-03-20 06:30 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/cdpapihb.c
! fixed hb_transalte() to not clear passed string

View File

@@ -1692,9 +1692,11 @@ HB_FUNC( CURL_EASY_SETOPT )
case HB_CURLOPT_MAXCONNECTS:
res = curl_easy_setopt( hb_curl->curl, CURLOPT_MAXCONNECTS, hb_parnl( 3 ) );
break;
#if LIBCURL_VERSION_NUM < 0x080A00
case HB_CURLOPT_CLOSEPOLICY: /* OBSOLETE, does nothing. */
res = curl_easy_setopt( hb_curl->curl, CURLOPT_CLOSEPOLICY, hb_parnl( 3 ) );
break;
#endif
case HB_CURLOPT_FRESH_CONNECT:
res = curl_easy_setopt( hb_curl->curl, CURLOPT_FRESH_CONNECT, HB_CURL_OPT_BOOL( 3 ) );
break;
@@ -2662,9 +2664,11 @@ HB_FUNC( CURL_WS_RECV )
#if LIBCURL_VERSION_NUM >= 0x075600
PHB_CURL hb_curl = PHB_CURL_par( 1 );
#if LIBCURL_VERSION_NUM >= 0x080200
const struct curl_ws_frame * meta = NULL;
#else
struct curl_ws_frame * meta = NULL;
#endif
PHB_ITEM pBuffer = hb_param( 2, HB_IT_STRING );
char * buffer;
HB_SIZE buflen;

View File

@@ -1300,7 +1300,7 @@ HB_FUNC( SSL_GET_OPTIONS )
SSL * ssl = hb_SSL_par( 1 );
if( ssl )
hb_retnl( SSL_get_options( ssl ) );
hb_retnint( SSL_get_options( ssl ) );
}
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
@@ -1313,7 +1313,11 @@ HB_FUNC( SSL_SET_OPTIONS )
SSL * ssl = hb_SSL_par( 1 );
if( ssl )
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
SSL_set_options( ssl, ( uint64_t ) hb_parnint( 2 ) );
#else
SSL_set_options( ssl, ( unsigned long ) hb_parnl( 2 ) );
#endif
}
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );

View File

@@ -528,7 +528,7 @@ HB_FUNC( SSL_CTX_GET_OPTIONS )
SSL_CTX * ctx = hb_SSL_CTX_par( 1 );
if( ctx )
hb_retnl( SSL_CTX_get_options( ctx ) );
hb_retnint( SSL_CTX_get_options( ctx ) );
}
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
@@ -541,7 +541,11 @@ HB_FUNC( SSL_CTX_SET_OPTIONS )
SSL_CTX * ctx = hb_SSL_CTX_par( 1 );
if( ctx )
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
SSL_CTX_set_options( ctx, ( uint64_t ) hb_parnint( 2 ) );
#else
SSL_CTX_set_options( ctx, ( unsigned long ) hb_parnl( 2 ) );
#endif
}
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );