libcrypto.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

2021-08-17 Thread Stephen Dominic Liang
Hi. I installed OpenSSL 1.1 (MacOS 11.3.1) using Homebrew. I added the following to my .bash_profile: export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig" I added this to the global path file at /etc/paths: /opt/homebrew/opt/openssl@1.1/bin I've tried a number of other steps. Wh

RE: [EXTERNAL] Re: IMPLEMENT_ASN1_FUNCTIONS tutorial or help

2021-08-17 Thread Sands, Daniel via openssl-users
> My latest attempt to code the below DER is this. It compiles, but the d2i > segfaults on apparently the second element. > > Anything obviously wrong? > > typedef struct { > ASN1_INTEGER *version; > ASN1_INTEGER *serialNumber; > X509_ALGOR *signature; > X509_PUBKEY *key; >

Re: IMPLEMENT_ASN1_FUNCTIONS tutorial or help

2021-08-17 Thread Ken Goldman
My latest attempt to code the below DER is this. It compiles, but the d2i segfaults on apparently the second element. Anything obviously wrong? typedef struct { ASN1_INTEGER *version; ASN1_INTEGER *serialNumber; X509_ALGOR *signature; X509_PUBKEY *key; } TPM_ADDTOCERT; ASN1_S

Re: [EXTERNAL] Re: IMPLEMENT_ASN1_FUNCTIONS tutorial or help

2021-08-17 Thread Ken Goldman
On 8/17/2021 12:57 PM, Sands, Daniel via openssl-users wrote: Now I would like to do the other end, where I have der and I want to parse back to the structure, using d2i() 1 - Is there a tutorial on this? Seems like you don't need one. If you got i2d working you should have d2i already! I

Re: Help Needed for deprecated functions and macros like "CRYPTO_num_locks()" , "CRYPTO_LOCK" ......etc

2021-08-17 Thread Dr Paul Dale
Locking in OpenSSL 1.1.1 and later is completely different.  You no longer need to and should not try to register the locking callbacks. Pauli On 17/8/21 11:59 pm, Kumar Mishra, Sanjeev wrote: Hi All, I am upgrading the code from OpenSSL 1.0.1 to OpenSSL 3.0. I am getting compilation errors f

RE: [EXTERNAL] Re: IMPLEMENT_ASN1_FUNCTIONS tutorial or help

2021-08-17 Thread Sands, Daniel via openssl-users
> >> Now I would like to do the other end, where I have der and I want to > >> parse back to the structure, using d2i() > >> > >> 1 - Is there a tutorial on this? > > > > Seems like you don't need one. If you got i2d working you should have d2i > already! > > > > I wasn't clear. The input and out

Re: Openssl 1.1.1 - QNX support removed?

2021-08-17 Thread Heikki Vatiainen
On 13.8.2021 21.14, Mishra, Ankur wrote: At following website it is mentioned that QNX support is removed in 1.1.1 version of OpenSSL. Anyone know if this is right information and in that case what is alternate for it. See this for more information https://github.com/openssl/openssl/pull/

Forthcoming OpenSSL release

2021-08-17 Thread Matt Caswell
The OpenSSL project team would like to announce the forthcoming release of OpenSSL version 1.1.1l. This release will be made available on Tuesday 24th August 2021 between 1200-1600 UTC. OpenSSL 1.1.1l is a security-fix release. The highest severity issue fixed in this release is HIGH: https://ww

Re: IMPLEMENT_ASN1_FUNCTIONS tutorial or help

2021-08-17 Thread Ken Goldman
On 8/17/2021 10:38 AM, Matt Caswell wrote: On 16/08/2021 21:56, Ken Goldman wrote: I am trying to parse some ASN.1 DER so I can add it to an X.509 certificate. For the input side, a poster showed me ASN1_SEQUENCE, ASN1_SEQUENCE_END, and then DECLARE_ASN1_FUNCTIONS, IMPLEMENT_ASN1_FUNCTIONS

Re: IMPLEMENT_ASN1_FUNCTIONS tutorial or help

2021-08-17 Thread Matt Caswell
On 16/08/2021 21:56, Ken Goldman wrote: I am trying to parse some ASN.1 DER so I can add it to an X.509 certificate. For the input side, a poster showed me ASN1_SEQUENCE, ASN1_SEQUENCE_END, and then DECLARE_ASN1_FUNCTIONS, IMPLEMENT_ASN1_FUNCTIONS which created the i2d() function. It sho

Help Needed for deprecated functions and macros like "CRYPTO_num_locks()" , "CRYPTO_LOCK" ......etc

2021-08-17 Thread Kumar Mishra, Sanjeev
Hi All, I am upgrading the code from OpenSSL 1.0.1 to OpenSSL 3.0. I am getting compilation errors for deprecated functions and macros like "CRYPTO_num_locks()" , "CRYPTO_LOCK" ..etc. But there is not any replacement for these functions and macros in OpenSSL 3.0. How can I handle these compil

DES_is_weak_key replacement in openssl 3.0

2021-08-17 Thread Paramashivaiah, Sunil
Hi All, I am not able to find EVP API for replacing deprecated DES_is_weak_key API. Does checking DES_is_weak_key not required for using EVP API's for DES related operations in openssl 3.0. Please suggest. Thanks and Regards, Sunil Notice: This e-mail together with any a

RE: Replacing DES_ede3_cbc_encrypt with EVP API's for upgrading to openssl 3.0

2021-08-17 Thread Paramashivaiah, Sunil
Corrected the typo From: Paramashivaiah, Sunil Sent: Tuesday, August 17, 2021 3:48 PM To: openssl-users@openssl.org Cc: Bhattacharjee, Debapriyo (c) Subject: Replacing DES_ede3_cbc_encrypt with EVP API's for upgrading to openssl 3.0 Hi All, I am trying to upgrade our application

Replacing DES_ede3_cbc_encrypt with EVP API's for upgrading to openssl 3.0

2021-08-17 Thread Paramashivaiah, Sunil
Hi All, I am trying to upgrade over application to use openssl 3.0 from openssl 1.0.2. I am trying to replace DES_ede3_cbc_encrypt with EVP API's as below. DES_ede3_cbc_encrypt accepts 3 keys got from des_key_sched. But for same thing t

Re: Replacement for AES_set_encrypt_key and AES_encrypt to support 3.0

2021-08-17 Thread Dr Paul Dale
You don't want to use these and there is no direct replacement.  You want to use the EVP calls instead:  EVP_CipherInit_ex2, EVP_CipherUpdate, EVP_CipherFinal_ex and friends. See this manual page:     https://www.openssl.org/docs/manmaster/man3/EVP_EncryptInit.html Pauli On 17/8/21 5:11 pm,

Replacement for AES_set_encrypt_key and AES_encrypt to support 3.0

2021-08-17 Thread Shivakumar Poojari
Hi All, We are upgrading our code to openssl 3.0. we need replacement for AES_set_encrypt_key and AES_encrypt, these two functions are in two different functions previously we replaced below functions AES_set_decrypt_key() AES_cbc_encrypt() to EVP_CipherInit_ex