Skip to content

Commit

Permalink
Update rsa.c
Browse files Browse the repository at this point in the history
  • Loading branch information
EMG60 authored Jan 27, 2024
1 parent 8405632 commit ae56fd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contrib/hbssl/rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ HB_FUNC( RSA_PUBLIC_ENCRYPT )

buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 );

ret = RSA_public_encrypt( flen, HB_UNCONST( from ), buffer, rsa, padding );
ret = RSA_public_encrypt( flen, ( const unsigned char * ) HB_UNCONST( from ), buffer, rsa, padding );
if( ret > 0 )
{
if( ! hb_storclen_buffer( ( char * ) buffer, ret, 3 ) )
Expand Down Expand Up @@ -146,7 +146,7 @@ HB_FUNC( RSA_PRIVATE_DECRYPT )

buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 );

ret = RSA_private_decrypt( flen, HB_UNCONST( from ), buffer, rsa, padding );
ret = RSA_private_decrypt( flen, ( const unsigned char * ) HB_UNCONST( from ), buffer, rsa, padding );
if( ret > 0 )
{
buffer = ( unsigned char * ) hb_xrealloc( buffer, ret + 1 );
Expand Down Expand Up @@ -179,7 +179,7 @@ HB_FUNC( RSA_PRIVATE_ENCRYPT )

buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 );

ret = RSA_private_encrypt( flen, HB_UNCONST( from ), buffer, rsa, padding );
ret = RSA_private_encrypt( flen, ( const unsigned char * ) HB_UNCONST( from ), buffer, rsa, padding );
if( ret > 0 )
{
if( ! hb_storclen_buffer( ( char * ) buffer, ret, 3 ) )
Expand Down Expand Up @@ -211,7 +211,7 @@ HB_FUNC( RSA_PUBLIC_DECRYPT )

buffer = ( unsigned char * ) hb_xgrab( RSA_size( rsa ) + 1 );

ret = RSA_public_decrypt( flen, HB_UNCONST( from ), buffer, rsa, padding );
ret = RSA_public_decrypt( flen, ( const unsigned char * ) HB_UNCONST( from ), buffer, rsa, padding );
if( ret > 0 )
{
buffer = ( unsigned char * ) hb_xrealloc( buffer, ret + 1 );
Expand Down

0 comments on commit ae56fd0

Please sign in to comment.