SQLite 3.7.10+ e SQLite 3.14.0+
Novas funções RSA.
Código: Selecionar todos
2023-11-30 18:12 UTC+0100 Phil Krylov (phil a t krylov.eu)
* contrib/hbsqlit3/core.c
* contrib/hbsqlit3/hbsqlit3.ch
* contrib/hbsqlit3/hbsqlit3.hbx
* Implemented SQLITE3_DB_FILENAME() on SQLite 3.7.10+.
* Implemented SQLITE3_EXPANDED_SQL(), SQLITE3_TRACE_V2() on SQLite 3.14.0+.
; Thanks to Mindaugas Kavaliauskas for thorough reviewing!
* contrib/hbsqlit3/tests/backup.prg
* contrib/hbsqlit3/tests/demo.prg
* Updated examples to use SQLITE3_TRACE_V2() on SQLite 3.14.0+.
2023-11-22 09:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/hbssl.hbm
* contrib/hbssl/hbssl.hbx
* contrib/hbssl/hbssl.h
+ contrib/hbssl/rsa.c
+ added PRG functions for RSA encryption/decryption:
RSA_size( <pKey> ) -> <nCipherBlockSize>
RSA_public_encrypt( <pKey>, <cData>, @<cDataEnc> ;
[, <nPadding> = HB_RSA_PKCS1_PADDING ] ) ;
-> <nSize> > 0 | <nError> <= 0
RSA_private_decrypt( <pKey>, <cDataEnc>, @<cDataDec> ;
[, <nPadding> = HB_RSA_PKCS1_PADDING ] ) ;
-> <nSize> > 0 | <nError> <= 0
RSA_private_encrypt( <pKey>, <cData>, @<cDataEnc> ;
[, <nPadding> = HB_RSA_PKCS1_PADDING ] ) ;
-> <nSize> > 0 | <nError> <= 0
RSA_public_decrypt( <pKey>, <cDataEnc>, @<cDataDec> ;
[, <nPadding> = HB_RSA_PKCS1_PADDING ] ) ;
-> <nSize> > 0 | <nError> <= 0
+ added C functions for manipulating RSA keys inside HB_ITEMs:
HB_BOOL hb_RSA_is( int iParam );
RSA * hb_RSA_par( int iParam );
void hb_RSA_ret( RSA * rsa );
* contrib/hbssl/pem.c
+ added support for RSA keys.
Now the following PRG functions return RSA key which can be passed to
RSA_* functions:
PEM_READ_BIO_RSAPRIVATEKEY()
PEM_READ_BIO_RSAPUBLICKEY()
PEM_READ_BIO_RSA_PUBKEY()
* contrib/hbssl/evppkey.c
+ added functions for EVP_PKEY encryption/decryption:
EVP_PKEY_base_id( <pKey> ) -> <nType>
EVP_PKEY_CTX_new( <pKey> ) -> <pKeyCTX>
EVP_PKEY_encrypt_init( <pKeyCTX> ) -> <nResult> (1 - OK, <=0 - Error)
EVP_PKEY_encrypt( <pKeyCTX>, @<cDataEnc>, <cData> ) ;
-> <nSize> > 0 | <nError> <= 0
EVP_PKEY_decrypt_init( <pKeyCTX> ) -> <nResult> (1 - OK, <=0 - Error)
EVP_PKEY_decrypt( <pKeyCTX>, @<cDataDec>, <cDataEnc> ) ;
-> <nSize> > 0 | <nError> <= 0
Above functions can be used with keys loaded by:
PEM_READ_PRIVATEKEY()
PEM_READ_PUBKEY()
In OpenSSL 3.0 typed functions like *RSA*, *DSA*, *DH*, ... are
depreciated and common for different methods EVP ones should be
used instead.
+ added support for RSA encryption/decryption in above functions in
OpenSSL libraries prior 1.0.0 which do not have EVP_PKEY_CTX. RSA
support is emulated by direct calls to RSA_* functions so now for
RSA it's possible to use new functions with old OpenSSL libraries.
* contrib/hbssl/hbssl.ch
+ added constants for RSA padding: HB_RSA_*_PADDING
+ added constants for EVP PKEY types: HB_EVP_PKEY_*
* contrib/hbssl/hbssl.hbx
+ added new functions
Itamar M. Lins Jr.
