Why custom RSA engine is not calling default RSA method?

2021-09-27 Thread Shariful Alam
Hello, I have the following simple RSA engine code from *e_dasync.c. * Following code compiles and works. Until now, I was under the impression that if I do not supply an alternative method in function *bind_dasync(), the *engine will use the default method. However, it doesn't seem to be the

EVP_EncryptInit_ex2() operation

2021-09-27 Thread Ken Goldman
Does it make sense to initialize the context once and then use it multiple times, or is cleaner to create a new one from the raw key byte string each time? I've seen sample code that uses this to 'reset' the context for a new encryption. EVP_EncryptInit_ex2(e, NULL, NULL, NULL, NULL);

Re: OpenSSL SSL_CTX_set_default_verify_paths Slow

2021-09-27 Thread Viktor Dukhovni
> On 27 Sep 2021, at 11:24 am, Jay Foster wrote: > > I don't think so. The file system is a UBIFS on nand flash, and it works > with 1.0.2 and 1.1.1. Even 1.1.1 is a *little* bit slower than 1.0.2, but > nowhere near as much slower as 3.0.0. > > It looks like the OpenSSL library is reading

Re: OpenSSL SSL_CTX_set_default_verify_paths Slow

2021-09-27 Thread Tomas Mraz
On Mon, 2021-09-27 at 08:24 -0700, Jay Foster wrote: > On 9/27/21 7:33 AM, Michael Richardson wrote: > > Jay Foster wrote: > > > While migrating some applications from OpenSSL 1.0.2 (and > > 1.1.1) to > > > 3.0.0, I have noticed that the > > SSL_CTX_set_default_verify_paths() > > >

Re: OpenSSL SSL_CTX_set_default_verify_paths Slow

2021-09-27 Thread Jay Foster
On 9/27/21 7:33 AM, Michael Richardson wrote: Jay Foster wrote: > While migrating some applications from OpenSSL 1.0.2 (and 1.1.1) to > 3.0.0, I have noticed that the SSL_CTX_set_default_verify_paths() > function is much slower in 3.0.0.  In 1.0.0 it would take about 0.1 >

Re: OpenSSL SSL_CTX_set_default_verify_paths Slow

2021-09-27 Thread Michael Richardson
Jay Foster wrote: > While migrating some applications from OpenSSL 1.0.2 (and 1.1.1) to > 3.0.0, I have noticed that the SSL_CTX_set_default_verify_paths() > function is much slower in 3.0.0.  In 1.0.0 it would take about 0.1 > seconds and in 3.0.0 it takes over 3 seconds. Based

Re: query on PEM_write_bio_PKCS8PrivateKey

2021-09-27 Thread Matt Caswell
On 25/09/2021 06:06, SIMON BABY wrote: Hi Team, I have a query. I see the below API is used to write the private key in encrypted PKCS#8 format. / / / PEM_write_bio_PKCS8PrivateKey()/ and /PEM_write_PKCS8PrivateKey()/ write a private key in an EVP_PKEY structure in PKCS#8

Re: RSA provider use example

2021-09-27 Thread Matt Caswell
On 24/09/2021 16:51, Antonio Santagiuliana wrote: Thank you for your reply. I'm still a bit confused though. In /providers/implementations/asymcipher/rsa_enc.c I find function rsa_decrypt() that calls RSA_private_decrypt(prsactx->rsa) I haven't found other implementation of this

Re: Replacement for BIO_get_port(), BIO_get_host_ip()

2021-09-27 Thread Matt Caswell
On 24/09/2021 07:05, Shivakumar Poojari wrote: Hi BIO_get_port(), BIO_get_host_ip(),  were deprecated in OpenSSL 1.1.0. Trying for replacement for OpenSSl 3.0 Gone through the below man page, but not found alternative function. https://www.openssl.org/docs/manmaster/man3/BIO_connect.html

Re: [EXTERNAL] Re: Replacement for BIO_get_port(), BIO_get_host_ip()

2021-09-27 Thread Shivakumar Poojari
Hi jordan, I sent one mail previously with same subject around Thu 9/23/2021 5:50 PM(IST) But not received any respond back, usually I use to get response with in 12hr. Hi all Im not able to find any replacement for BIO_get_port(), BIO_get_host_ip() In stack overflow i seen some suggestion