2015-02-19 23:10 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/hbssl.h
* added HB_SSL_CONST macro which can be used instead of 'const'
qualifier to pacify "discards qualifier 'const'" warnings in
OpenSSL versions prior 0.9.8
* contrib/hbssl/evp.c
* contrib/hbssl/evpciph.c
* contrib/hbssl/evpenc.c
* contrib/hbssl/evpmd.c
* contrib/hbssl/ssl.c
* contrib/hbssl/sslctx.c
* use HB_SSL_CONST macro to pacify warnings in 0.9.6 and 0.9.7
OpenSSL versions
; Now HBSSL compiles cleanly without any warnings with different
OpenSSL final versions starting with 0.9.6
This commit is contained in:
@@ -10,25 +10,43 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2015-02-19 23:10 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/hbssl/hbssl.h
|
||||
* added HB_SSL_CONST macro which can be used instead of 'const'
|
||||
qualifier to pacify "discards qualifier 'const'" warnings in
|
||||
OpenSSL versions prior 0.9.8
|
||||
|
||||
* contrib/hbssl/evp.c
|
||||
* contrib/hbssl/evpciph.c
|
||||
* contrib/hbssl/evpenc.c
|
||||
* contrib/hbssl/evpmd.c
|
||||
* contrib/hbssl/ssl.c
|
||||
* contrib/hbssl/sslctx.c
|
||||
* use HB_SSL_CONST macro to pacify warnings in 0.9.6 and 0.9.7
|
||||
OpenSSL versions
|
||||
|
||||
; Now HBSSL compiles cleanly without any warnings with different
|
||||
OpenSSL final versions starting with 0.9.6
|
||||
|
||||
2015-02-19 13:15 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
|
||||
* contrib/hbtop/popcli.prg
|
||||
! Fixed: METHOD top( nMsgId )
|
||||
::inetSendAll( ::SocketCon, "TOP " + hb_ntos( nMsgId ) + " 0 " + ::cCRLF )
|
||||
=>
|
||||
::inetSendAll( ::SocketCon, "TOP " + hb_ntos( nMsgId ) + " 0" + ::cCRLF )
|
||||
|
||||
+ Added: following convinient methods:
|
||||
::inetSendAll( ::SocketCon, "TOP " + hb_ntos( nMsgId ) + " 0 " + ::cCRLF )
|
||||
=>
|
||||
::inetSendAll( ::SocketCon, "TOP " + hb_ntos( nMsgId ) + " 0" + ::cCRLF )
|
||||
|
||||
+ Added: following convinient methods:
|
||||
METHOD getTop( nMsgId, lAsArray ) -> arrayOrStringOfHeaderOF_nMsgId
|
||||
METHOD getMessageRaw( nMsgId, lAsArray ) -> arrayOrStringOfEntireMessageOF_nMsgId
|
||||
METHOD getBody( nMsgId, lAsArray ) -> arrayOrStringOfMessageBodyOF_nMsgId
|
||||
METHOD getSubject( nMsgId ) -> cSubjectLineOF_nMsgId
|
||||
|
||||
|
||||
2015-02-19 13:09 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
|
||||
* contrib/gtwvg/gtwvgd.c
|
||||
* contrib/gtwvg/gtwgud.c
|
||||
! Fixed: a bug which was causing HB_GTI_SETPOS_XY/ROWCOL returning
|
||||
wrong values in case it is called as GET method.
|
||||
|
||||
wrong values in case it is called as GET method.
|
||||
|
||||
2015-02-19 20:20 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/hbssl/evpciph.c
|
||||
* contrib/hbssl/hbssl.h
|
||||
|
||||
@@ -100,9 +100,9 @@ HB_FUNC( EVP_BYTESTOKEY )
|
||||
unsigned char iv[ EVP_MAX_IV_LENGTH ];
|
||||
|
||||
hb_retni( EVP_BytesToKey( cipher,
|
||||
md,
|
||||
( const unsigned char * ) hb_parc( 3 ) /* salt */,
|
||||
( const unsigned char * ) hb_parcx( 4 ) /* data */,
|
||||
( HB_SSL_CONST EVP_MD * ) md,
|
||||
( HB_SSL_CONST unsigned char * ) hb_parc( 3 ) /* salt */,
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 4 ) /* data */,
|
||||
( int ) hb_parclen( 4 ),
|
||||
hb_parni( 5 ) /* count */,
|
||||
key,
|
||||
|
||||
@@ -587,8 +587,8 @@ HB_FUNC( EVP_ENCRYPTINIT )
|
||||
if( ctx )
|
||||
hb_retni( EVP_EncryptInit( ctx,
|
||||
cipher,
|
||||
( const unsigned char * ) hb_parc( 3 ),
|
||||
( const unsigned char * ) hb_parc( 4 ) ) );
|
||||
( HB_SSL_CONST unsigned char * ) hb_parc( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parc( 4 ) ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
@@ -629,7 +629,7 @@ HB_FUNC( EVP_ENCRYPTUPDATE )
|
||||
hb_retni( EVP_EncryptUpdate( ctx,
|
||||
buffer,
|
||||
&size,
|
||||
( const unsigned char * ) hb_parcx( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 3 ),
|
||||
( int ) hb_parclen( 3 ) ) );
|
||||
|
||||
if( size > 0 )
|
||||
@@ -719,8 +719,8 @@ HB_FUNC( EVP_DECRYPTINIT )
|
||||
if( ctx )
|
||||
hb_retni( EVP_DecryptInit( ctx,
|
||||
cipher,
|
||||
( const unsigned char * ) hb_parc( 3 ),
|
||||
( const unsigned char * ) hb_parc( 4 ) ) );
|
||||
( HB_SSL_CONST unsigned char * ) hb_parc( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parc( 4 ) ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
@@ -761,7 +761,7 @@ HB_FUNC( EVP_DECRYPTUPDATE )
|
||||
hb_retni( EVP_DecryptUpdate( ctx,
|
||||
buffer,
|
||||
&size,
|
||||
( const unsigned char * ) hb_parcx( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 3 ),
|
||||
( int ) hb_parclen( 3 ) ) );
|
||||
|
||||
if( size > 0 )
|
||||
@@ -851,8 +851,8 @@ HB_FUNC( EVP_CIPHERINIT )
|
||||
if( ctx )
|
||||
hb_retni( EVP_CipherInit( ctx,
|
||||
cipher,
|
||||
( const unsigned char * ) hb_parc( 3 ),
|
||||
( const unsigned char * ) hb_parc( 4 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parc( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parc( 4 ),
|
||||
hb_parni( 5 ) ) );
|
||||
}
|
||||
else
|
||||
@@ -895,7 +895,7 @@ HB_FUNC( EVP_CIPHERUPDATE )
|
||||
hb_retni( EVP_CipherUpdate( ctx,
|
||||
buffer,
|
||||
&size,
|
||||
( const unsigned char * ) hb_parcx( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 3 ),
|
||||
( int ) hb_parclen( 3 ) ) );
|
||||
|
||||
if( size > 0 )
|
||||
@@ -1015,7 +1015,7 @@ HB_FUNC( EVP_SEALINIT )
|
||||
}
|
||||
|
||||
hb_retni( EVP_SealInit( ctx,
|
||||
cipher,
|
||||
( HB_SSL_CONST EVP_CIPHER * ) cipher,
|
||||
ek,
|
||||
ekl,
|
||||
iv,
|
||||
@@ -1062,7 +1062,7 @@ HB_FUNC( EVP_SEALUPDATE )
|
||||
hb_retni( EVP_SealUpdate( ctx,
|
||||
buffer,
|
||||
&size,
|
||||
( const unsigned char * ) hb_parcx( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 3 ),
|
||||
( int ) hb_parclen( 3 ) ) );
|
||||
|
||||
if( size > 0 )
|
||||
@@ -1126,10 +1126,10 @@ HB_FUNC( EVP_OPENINIT )
|
||||
|
||||
if( ctx && priv )
|
||||
hb_retni( EVP_OpenInit( ctx,
|
||||
cipher,
|
||||
( const unsigned char * ) hb_parcx( 3 ),
|
||||
( HB_SSL_CONST EVP_CIPHER * ) cipher,
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 3 ),
|
||||
( int ) hb_parclen( 3 ),
|
||||
( HB_ISCHAR( 4 ) && ( int ) hb_parclen( 4 ) == EVP_CIPHER_iv_length( cipher ) ) ? ( const unsigned char * ) hb_parc( 4 ) : NULL,
|
||||
( HB_ISCHAR( 4 ) && ( int ) hb_parclen( 4 ) == EVP_CIPHER_iv_length( cipher ) ) ? ( HB_SSL_CONST unsigned char * ) hb_parc( 4 ) : NULL,
|
||||
priv ) );
|
||||
}
|
||||
else
|
||||
@@ -1150,7 +1150,7 @@ HB_FUNC( EVP_OPENUPDATE )
|
||||
hb_retni( EVP_OpenUpdate( ctx,
|
||||
buffer,
|
||||
&size,
|
||||
( const unsigned char * ) hb_parcx( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 3 ),
|
||||
( int ) hb_parclen( 3 ) ) );
|
||||
|
||||
if( size > 0 )
|
||||
|
||||
@@ -125,7 +125,7 @@ HB_FUNC( EVP_ENCODEUPDATE )
|
||||
EVP_EncodeUpdate( ctx,
|
||||
buffer,
|
||||
&size,
|
||||
( const unsigned char * ) hb_parcx( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 3 ),
|
||||
( int ) hb_parclen( 3 ) );
|
||||
|
||||
if( size > 0 )
|
||||
@@ -200,7 +200,7 @@ HB_FUNC( EVP_DECODEUPDATE )
|
||||
EVP_DecodeUpdate( ctx,
|
||||
buffer,
|
||||
&size,
|
||||
( const unsigned char * ) hb_parcx( 3 ),
|
||||
( HB_SSL_CONST unsigned char * ) hb_parcx( 3 ),
|
||||
( int ) hb_parclen( 3 ) );
|
||||
|
||||
if( size > 0 )
|
||||
|
||||
@@ -605,7 +605,7 @@ HB_FUNC( EVP_VERIFYFINAL )
|
||||
EVP_MD_CTX * ctx = hb_EVP_MD_CTX_par( 1 );
|
||||
|
||||
if( ctx )
|
||||
hb_retni( EVP_VerifyFinal( ctx, ( const unsigned char * ) hb_parcx( 2 ), ( unsigned int ) hb_parclen( 2 ), hb_EVP_PKEY_par( 3 ) ) );
|
||||
hb_retni( EVP_VerifyFinal( ctx, ( HB_SSL_CONST unsigned char * ) hb_parcx( 2 ), ( unsigned int ) hb_parclen( 2 ), hb_EVP_PKEY_par( 3 ) ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
|
||||
@@ -157,6 +157,14 @@
|
||||
#define SSL_get_wfd SSL_get_fd
|
||||
#endif
|
||||
|
||||
/* use macro to pacify warnings with missing 'const' in some function
|
||||
declarations in OpenSSL prior 0.9.8 */
|
||||
#if OPENSSL_VERSION_NUMBER < 0x0090800fL
|
||||
#define HB_SSL_CONST
|
||||
#else
|
||||
#define HB_SSL_CONST const
|
||||
#endif
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
extern const SSL_METHOD * hb_ssl_method_id_to_ptr( int n );
|
||||
|
||||
@@ -1469,7 +1469,7 @@ HB_FUNC( SSL_USE_PRIVATEKEY_ASN1 )
|
||||
SSL * ssl = hb_SSL_par( 2 );
|
||||
|
||||
if( ssl )
|
||||
hb_retni( SSL_use_PrivateKey_ASN1( hb_parni( 1 ), ssl, ( const unsigned char * ) hb_parc( 3 ), ( int ) hb_parclen( 3 ) ) );
|
||||
hb_retni( SSL_use_PrivateKey_ASN1( hb_parni( 1 ), ssl, ( HB_SSL_CONST unsigned char * ) hb_parc( 3 ), ( int ) hb_parclen( 3 ) ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
@@ -1482,7 +1482,7 @@ HB_FUNC( SSL_USE_CERTIFICATE_ASN1 )
|
||||
SSL * ssl = hb_SSL_par( 1 );
|
||||
|
||||
if( ssl )
|
||||
hb_retni( SSL_use_certificate_ASN1( ssl, ( const unsigned char * ) hb_parc( 2 ), ( int ) hb_parclen( 2 ) ) );
|
||||
hb_retni( SSL_use_certificate_ASN1( ssl, ( HB_SSL_CONST unsigned char * ) hb_parc( 2 ), ( int ) hb_parclen( 2 ) ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
|
||||
@@ -698,7 +698,7 @@ HB_FUNC( SSL_CTX_USE_RSAPRIVATEKEY_ASN1 )
|
||||
SSL_CTX * ctx = hb_SSL_CTX_par( 1 );
|
||||
|
||||
if( ctx )
|
||||
hb_retni( SSL_CTX_use_RSAPrivateKey_ASN1( ctx, ( const unsigned char * ) hb_parc( 2 ), ( int ) hb_parclen( 2 ) ) );
|
||||
hb_retni( SSL_CTX_use_RSAPrivateKey_ASN1( ctx, ( HB_SSL_CONST unsigned char * ) hb_parc( 2 ), ( int ) hb_parclen( 2 ) ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
@@ -711,7 +711,7 @@ HB_FUNC( SSL_CTX_USE_PRIVATEKEY_ASN1 )
|
||||
SSL_CTX * ctx = hb_SSL_CTX_par( 2 );
|
||||
|
||||
if( ctx )
|
||||
hb_retni( SSL_CTX_use_PrivateKey_ASN1( hb_parni( 1 ), ctx, ( const unsigned char * ) hb_parc( 3 ), ( int ) hb_parclen( 3 ) ) );
|
||||
hb_retni( SSL_CTX_use_PrivateKey_ASN1( hb_parni( 1 ), ctx, ( HB_SSL_CONST unsigned char * ) hb_parc( 3 ), ( int ) hb_parclen( 3 ) ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
@@ -724,7 +724,7 @@ HB_FUNC( SSL_CTX_USE_CERTIFICATE_ASN1 )
|
||||
SSL_CTX * ctx = hb_SSL_CTX_par( 1 );
|
||||
|
||||
if( ctx )
|
||||
hb_retni( SSL_CTX_use_certificate_ASN1( ctx, ( int ) hb_parclen( 2 ), ( const unsigned char * ) hb_parc( 2 ) ) );
|
||||
hb_retni( SSL_CTX_use_certificate_ASN1( ctx, ( int ) hb_parclen( 2 ), ( HB_SSL_CONST unsigned char * ) hb_parc( 2 ) ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
|
||||
Reference in New Issue
Block a user