EVP_PKEY_CTX* Best Practices

2019-10-01 Thread Christian Mazakas
I'm relatively new to the world of OpenSSL. I'm trying to write a QUIC stream class and for that, I need to use the EVP_PKEY_CTX and I'm not sure what's the optimal way of scoping instances of this context. For example, should I have a CTX per Quic connection? Or rather one that's shared by many

Re: Fwd: ASN1_generate_nconf - incorrect integer encoding?

2019-10-01 Thread Matt Caswell
On 01/10/2019 16:30, Rafał Arciszewski wrote: > Hi all, > I am trying to use OpenSSL libraries (libssl-dev 1.0.2 or 1.1.1)  to encode > integers into DER format.I am using ASN1_generate_nconf but it seems that this > function incorrectly encodes integers. It should encode in two's complement >

Fwd: ASN1_generate_nconf - incorrect integer encoding?

2019-10-01 Thread Rafał Arciszewski
Hi all, I am trying to use OpenSSL libraries (libssl-dev 1.0.2 or 1.1.1) to encode integers into DER format.I am using ASN1_generate_nconf but it seems that this function incorrectly encodes integers. It should encode in two's complement format and should prepend 0x00 byte if the first byte of

Re: KeyAgreeRecipientInfo.ukm

2019-10-01 Thread Dmitry Belyavsky
Hello, Well, some more diving into the code and I got the point. We already have the corresponding control ASN1_PKEY_CTRL_CMS_ENVELOPE On Tue, Oct 1, 2019 at 4:13 PM Dmitry Belyavsky wrote: > Dear all, > > I don't see anywhere except parsing any mention of > the KeyAgreeRecipientInfo.ukm

KeyAgreeRecipientInfo.ukm

2019-10-01 Thread Dmitry Belyavsky
Dear all, I don't see anywhere except parsing any mention of the KeyAgreeRecipientInfo.ukm field. Russian GOST CMS standard implies using of ukm value. Do I correctly understand that I have to add some support (presumably in the EVP_PKEY_CTX) of this field if it should be passed to the

RE: OpenSSL compilation errors in Windows

2019-10-01 Thread Nagalakshmi V J
Hi Salz, I am working on that only. I will try to not use those internal files as per the suggestions. Thanks and regards, Nagalakshmi From: Salz, Rich Sent: Tuesday, October 1, 2019 6:30 PM To: Nagalakshmi V J ; Sergio NNX ; Dr. Matthias St. Pierre ; Michael Mueller Cc:

RE: OpenSSL compilation errors in Windows

2019-10-01 Thread Nagalakshmi V J
Thank you Matthias for the explanation. I am going through my code to understand why ssl_locl.h is included. I will check and get back on this ASAP. Also if there is other way to achieve that I will use the same. Thanks and regards, Nagalakshmi -Original Message- From: Dr. Matthias St.

Re: OpenSSL compilation errors in Windows

2019-10-01 Thread Salz, Rich via openssl-users
Several people have told you the following: That is an *internal* openssl header file; do not use it. Remove the include statement from your code. Your code is wrong. That file is a C file, not compatible with C++ Why do you not listen?

Re: full-chain ocsp stapling

2019-10-01 Thread Jeremy Harris
On 30/09/2019 17:02, Matt Caswell wrote: >> Alternatively^2, is there some way to get such a blob from a tool >> (openssl ocsp, or similar) ready built? For this purpose, I am >> the CA. >> > > Yes, you can do this. For example see the "respout" option in the > ocsp command. > > From the

AW: OpenSSL compilation errors in Windows

2019-10-01 Thread Dr. Matthias St. Pierre
> We are using OpenSSL APIs in our product code. We are not making any changes > in OpenSSL. > Our product code is a C++ code and it makes use of openSSL APIs for some > functionality. Local headers (like "ssl_locl.h" and "packet_locl.h") are *NOT* part of the official OpenSSL API. Please

Re: [openssl-users] issue with EVP_EncryptUpdate in XTS mode?

2019-10-01 Thread Matt Caswell
On 25/01/2019 20:16, Andrew Tucker wrote: > I was doing some comparisons of XTS and GCM mode using the EVP APIs and found > a > discrepancy that seems to be an issue with XTS. > > In GCM mode if the buffer is encrypted in one call to EVP_EncryptUpdate or > with > several calls with smaller