2009-07-22 17:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* make_gnu.bat
! Added SHLVL=0 to make commands to force native shell
even if sh shell is found in the PATH (f.e. when msys or
cygwin is present there, for mingwarm targets, cygwin is
even required.)
* external/libhpdf/Makefile
+ Made it compile with mingwarm.
* include/hbextern.ch
! Fixed typo in prev.
* contrib/hbssl/pem.c
+ Added two new functions. Under testing.
PEM_READ_BIO_RSAPRIVATEKEY()
PEM_READ_BIO_RSAPUBLICKEY()
This commit is contained in:
@@ -17,6 +17,24 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-07-22 17:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* make_gnu.bat
|
||||
! Added SHLVL=0 to make commands to force native shell
|
||||
even if sh shell is found in the PATH (f.e. when msys or
|
||||
cygwin is present there, for mingwarm targets, cygwin is
|
||||
even required.)
|
||||
|
||||
* external/libhpdf/Makefile
|
||||
+ Made it compile with mingwarm.
|
||||
|
||||
* include/hbextern.ch
|
||||
! Fixed typo in prev.
|
||||
|
||||
* contrib/hbssl/pem.c
|
||||
+ Added two new functions. Under testing.
|
||||
PEM_READ_BIO_RSAPRIVATEKEY()
|
||||
PEM_READ_BIO_RSAPUBLICKEY()
|
||||
|
||||
2009-07-22 15:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
- contrib/hbcrypt
|
||||
* Deleted after move. (SVN got confused if done if previous pass)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
/* Callbacks */
|
||||
|
||||
int hb_ssl_pem_password_cb( char * buf, int size, int rwflag, void * userdata )
|
||||
static int hb_ssl_pem_password_cb( char * buf, int size, int rwflag, void * userdata )
|
||||
{
|
||||
int retsize = 0;
|
||||
|
||||
@@ -89,6 +89,78 @@ HB_FUNC( ERR_LOAD_PEM_STRINGS )
|
||||
ERR_load_PEM_strings();
|
||||
}
|
||||
|
||||
HB_FUNC( PEM_READ_BIO_RSAPRIVATEKEY )
|
||||
{
|
||||
BIO * bio;
|
||||
|
||||
if( HB_ISPOINTER( 1 ) )
|
||||
bio = hb_parptr( 1 );
|
||||
else if( HB_ISCHAR( 1 ) )
|
||||
bio = BIO_new_file( hb_parc( 1 ), "r" );
|
||||
else if( HB_ISNUM( 1 ) )
|
||||
bio = BIO_new_fd( hb_parni( 1 ), BIO_NOCLOSE );
|
||||
else
|
||||
bio = NULL;
|
||||
|
||||
if( bio )
|
||||
{
|
||||
PHB_ITEM pPassBlock = NULL;
|
||||
|
||||
if( HB_ISBLOCK( 2 ) )
|
||||
{
|
||||
pPassBlock = hb_itemNew( hb_param( 2, HB_IT_BLOCK ) );
|
||||
hb_retptr( PEM_read_bio_RSAPrivateKey( bio, NULL, hb_ssl_pem_password_cb, pPassBlock ) );
|
||||
}
|
||||
else if( HB_ISCHAR( 2 ) )
|
||||
/* NOTE: Dropping 'const' qualifier. [vszakats] */
|
||||
hb_retptr( PEM_read_bio_RSAPrivateKey( bio, NULL, NULL, ( void * ) hb_parc( 2 ) ) );
|
||||
|
||||
if( pPassBlock )
|
||||
hb_itemRelease( pPassBlock );
|
||||
|
||||
if( ! HB_ISPOINTER( 1 ) )
|
||||
BIO_free( bio );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
|
||||
HB_FUNC( PEM_READ_BIO_RSAPUBLICKEY )
|
||||
{
|
||||
BIO * bio;
|
||||
|
||||
if( HB_ISPOINTER( 1 ) )
|
||||
bio = hb_parptr( 1 );
|
||||
else if( HB_ISCHAR( 1 ) )
|
||||
bio = BIO_new_file( hb_parc( 1 ), "r" );
|
||||
else if( HB_ISNUM( 1 ) )
|
||||
bio = BIO_new_fd( hb_parni( 1 ), BIO_NOCLOSE );
|
||||
else
|
||||
bio = NULL;
|
||||
|
||||
if( bio )
|
||||
{
|
||||
PHB_ITEM pPassBlock = NULL;
|
||||
|
||||
if( HB_ISBLOCK( 2 ) )
|
||||
{
|
||||
pPassBlock = hb_itemNew( hb_param( 2, HB_IT_BLOCK ) );
|
||||
hb_retptr( PEM_read_bio_RSAPrivateKey( bio, NULL, hb_ssl_pem_password_cb, pPassBlock ) );
|
||||
}
|
||||
else if( HB_ISCHAR( 2 ) )
|
||||
/* NOTE: Dropping 'const' qualifier. [vszakats] */
|
||||
hb_retptr( PEM_read_bio_RSAPrivateKey( bio, NULL, NULL, ( void * ) hb_parc( 2 ) ) );
|
||||
|
||||
if( pPassBlock )
|
||||
hb_itemRelease( pPassBlock );
|
||||
|
||||
if( ! HB_ISPOINTER( 1 ) )
|
||||
BIO_free( bio );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
EVP_PKEY * PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u);
|
||||
|
||||
5
harbour/external/libhpdf/Makefile
vendored
5
harbour/external/libhpdf/Makefile
vendored
@@ -21,6 +21,11 @@ endif
|
||||
ifeq ($(HB_ARCHITECTURE),wce)
|
||||
HB_WITH_LIBHPDF=no
|
||||
endif
|
||||
ifeq ($(HB_COMPILER),mingwarm)
|
||||
HB_WITH_LIBHPDF=yes
|
||||
HB_USER_CFLAGS += -U__COREDLL__
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(HB_WITH_LIBHPDF),yes)
|
||||
|
||||
@@ -968,16 +968,16 @@ EXTERNAL HB_CRC32
|
||||
EXTERNAL HB_CRCCT
|
||||
EXTERNAL HB_MD5
|
||||
EXTERNAL HB_MD5FILE
|
||||
EXTERNAL HB_SHA1()
|
||||
EXTERNAL HB_HMAC_SHA1()
|
||||
EXTERNAL HB_SHA224()
|
||||
EXTERNAL HB_SHA256()
|
||||
EXTERNAL HB_SHA384()
|
||||
EXTERNAL HB_SHA512()
|
||||
EXTERNAL HB_HMAC_SHA224()
|
||||
EXTERNAL HB_HMAC_SHA256()
|
||||
EXTERNAL HB_HMAC_SHA384()
|
||||
EXTERNAL HB_HMAC_SHA512()
|
||||
EXTERNAL HB_SHA1
|
||||
EXTERNAL HB_HMAC_SHA1
|
||||
EXTERNAL HB_SHA224
|
||||
EXTERNAL HB_SHA256
|
||||
EXTERNAL HB_SHA384
|
||||
EXTERNAL HB_SHA512
|
||||
EXTERNAL HB_HMAC_SHA224
|
||||
EXTERNAL HB_HMAC_SHA256
|
||||
EXTERNAL HB_HMAC_SHA384
|
||||
EXTERNAL HB_HMAC_SHA512
|
||||
|
||||
EXTERNAL HB_BASE64DECODE
|
||||
EXTERNAL HB_BASE64ENCODE
|
||||
|
||||
@@ -183,7 +183,7 @@ if "%HB_COMPILER%" == "" set HB_COMPILER=djgpp
|
||||
set HB_CONTRIB_ADDONS=
|
||||
set HB_EXTERNALLIBS=no
|
||||
set HB_EXTERNAL_ADDONS=
|
||||
%_HB_MAKE% clean install %HB_USER_MAKEFLAGS% %_HB_BUILD_LOG%
|
||||
%_HB_MAKE% SHLVL=0 clean install %HB_USER_MAKEFLAGS% %_HB_BUILD_LOG%
|
||||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||||
if errorlevel 1 goto MAKE_DONE
|
||||
set HB_DYNLIB=no
|
||||
@@ -195,14 +195,14 @@ if "%HB_COMPILER%" == "" set HB_COMPILER=djgpp
|
||||
set _HB_CONTRIB_ADDONS=
|
||||
set _HB_EXTERNALLIBS=
|
||||
set _HB_EXTERNAL_ADDONS=
|
||||
%_HB_MAKE% clean install %HB_USER_MAKEFLAGS% %_HB_BUILD_LOG%
|
||||
%_HB_MAKE% SHLVL=0 clean install %HB_USER_MAKEFLAGS% %_HB_BUILD_LOG%
|
||||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||||
goto MAKE_DONE
|
||||
|
||||
:DO_GCC
|
||||
|
||||
set HB_DYNLIB=no
|
||||
%_HB_MAKE% clean install %HB_USER_MAKEFLAGS% %_HB_BUILD_LOG%
|
||||
%_HB_MAKE% SHLVL=0 clean install %HB_USER_MAKEFLAGS% %_HB_BUILD_LOG%
|
||||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||||
goto MAKE_DONE
|
||||
|
||||
@@ -217,7 +217,7 @@ if "%HB_COMPILER%" == "" set HB_COMPILER=djgpp
|
||||
|
||||
if "%HB_COMPILER%" == "cygwin" goto SKIP_WINDLL_CYG
|
||||
|
||||
%_HB_MAKE% %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 %_HB_BUILD_LOG%
|
||||
%_HB_MAKE% SHLVL=0 %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 %_HB_BUILD_LOG%
|
||||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||||
goto MAKE_DONE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user