static int hb_ssl_pem_password_cb( char * buf, int size, int rwflag, void * userdata ) { int retsize = 0; if( size > 0 && userdata && hb_vmRequestReenter() ) { hb_vmPushEvalSym(); hb_vmPush( ( PHB_ITEM ) userdata ); hb_vmPushLogical( rwflag ); hb_vmSend( 1 ); buf[ 0 ] = '\0'; retsize = ( int ) hb_parclen( -1 ); if( retsize > 0 ) { if( retsize > size ) retsize = size; memcpy( buf, hb_parc( -1 ), retsize ); } hb_vmRequestRestore(); } return retsize; }
static void s_fileFlush( PHB_FILE pFile, HB_BOOL fDirty ) { PHB_IOUSR pIO = ( PHB_IOUSR ) pFile->pFuncs; s_pushMethod( pIO, IOUSR_FLUSH ); hb_vmPush( pFile->pFileItm ); hb_vmPushLogical( fDirty ); hb_vmDo( 2 ); }
static void hb_ssl_msg_callback( int write_p, int version, int content_type, const void * buf, size_t len, SSL * ssl, void * userdata ) { HB_SYMBOL_UNUSED( ssl ); if( userdata && hb_vmRequestReenter() ) { hb_vmPushEvalSym(); hb_vmPush( ( PHB_ITEM ) userdata ); hb_vmPushLogical( write_p ); hb_vmPushInteger( version ); hb_vmPushInteger( content_type ); hb_vmPushString( ( const char * ) buf, ( HB_SIZE ) len ); hb_vmSend( 4 ); hb_vmRequestRestore(); } }