2018-05-11 12:23 UTC+0200 maurilio (maurilio.longo@libero.it)

* contrib/hbssl/hbssl.hbx
  * contrib/hbssl/ssl.c
    + Added function SSL_set_tlsext_host_name() which is needed to access
      a virtual host when using HTTPS.
      See https://en.wikipedia.org/wiki/Server_Name_Indication
    + Added function SSL_set_verify().
  * src/rtl/fstemp.c
    ! hb_fsTempName() was not returning a valid temp name on OS/2
This commit is contained in:
maurilio
2018-05-11 12:32:50 +02:00
parent 19c4c58b3d
commit 9183c2a865
4 changed files with 42 additions and 3 deletions

View File

@@ -7,6 +7,16 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */
2018-05-11 12:23 UTC+0200 maurilio (maurilio.longo@libero.it)
* contrib/hbssl/hbssl.hbx
* contrib/hbssl/ssl.c
+ Added function SSL_set_tlsext_host_name() which is needed to access
a virtual host when using HTTPS.
See https://en.wikipedia.org/wiki/Server_Name_Indication
+ Added function SSL_set_verify().
* src/rtl/fstemp.c
! hb_fsTempName() was not returning a valid temp name on OS/2
2018-03-16 19:10 UTC+0200 Phil Krylov (phil a t newstar.rinet.ru)
* include/hbexprb.c
* src/compiler/complex.c

View File

@@ -340,6 +340,8 @@ DYNAMIC SSL_set_read_ahead
DYNAMIC SSL_set_rfd
DYNAMIC SSL_set_shutdown
DYNAMIC SSL_set_ssl_method
DYNAMIC SSL_set_tlsext_host_name
DYNAMIC SSL_set_verify
DYNAMIC SSL_set_verify_result
DYNAMIC SSL_set_wfd
DYNAMIC SSL_shutdown

View File

@@ -1183,6 +1183,32 @@ HB_FUNC( SSL_SET_OPTIONS )
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
HB_FUNC( SSL_SET_VERIFY )
{
if( hb_SSL_is( 1 ) )
{
SSL * ssl = hb_SSL_par( 1 );
if( ssl )
SSL_set_verify( ssl, hb_parni( 2 ), NULL );
}
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
HB_FUNC( SSL_SET_TLSEXT_HOST_NAME )
{
if( hb_SSL_is( 1 ) )
{
SSL * ssl = hb_SSL_par( 1 );
if( ssl )
SSL_set_tlsext_host_name( ssl, hb_parc( 2 ) );
}
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
HB_FUNC( SSL_SET_QUIET_SHUTDOWN )
{
if( hb_SSL_is( 1 ) )

View File

@@ -131,7 +131,7 @@ static HB_BOOL fsGetTempDirByCase( char * pszName, const char * pszTempDir, HB_B
if( fOK )
{
# if defined( __DJGPP__ )
# if defined( __DJGPP__ ) || defined( HB_OS_OS2 )
/* convert '/' to '\' */
char * pszDelim = pszName;
while( ( pszDelim = strchr( pszDelim, '/' ) ) != NULL )
@@ -293,12 +293,12 @@ static HB_BOOL hb_fsTempName( char * pszBuffer, const char * pszDir, const char
HB_SYMBOL_UNUSED( pszPrefix );
pTmpBuffer[ 0 ] = '\0';
fResult = ( tmpnam( pszBuffer ) != NULL );
fResult = ( tmpnam( pTmpBuffer ) != NULL );
pTmpBuffer[ L_tmpnam ] = '\0';
if( fResult )
{
# if defined( __DJGPP__ )
# if defined( __DJGPP__ ) || defined( HB_OS_OS2 )
/* convert '/' to '\' */
char * pszDelim = pTmpBuffer;
while( ( pszDelim = strchr( pszDelim, '/' ) ) != NULL )
@@ -334,6 +334,7 @@ HB_FHANDLE hb_fsCreateTemp( const char * pszDir, const char * pszPrefix, HB_FATT
{
if( hb_fsTempName( pszName, pszDir, pszPrefix ) )
{
#if defined( HB_OS_WIN )
/* Using FO_TRUNC on win platforms as hb_fsTempName() uses GetTempFileName(),
which creates the file, so FO_EXCL would fail at this point. [vszakats] */