Undefined Reference to "bn_get_words()" and "bn_get_top()".

2022-01-11 Thread Kumar Mishra, Sanjeev
Hi, I am getting following linking Error for APIs "bn_get_words()" and "bn_get_top()" while compiling with OpenSSL 3.0. Although crypto/bn.h is included in file. Please help to resolve it. Regards, Sanjeev /bin/ld: warning: libssl.so.1.1, needed by /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_

Queries for openssl

2021-11-23 Thread Kumar Mishra, Sanjeev
Hi , I have two queries to be asked. 1. Is there any Api which is used to convert certificates from PEM format to DER format? 2. Does these two Api's return same value ?( These Api's give NULL when they are failing, I need to know if they return same value in success case) 3. d2i_X509

Help Required For Coding FIPS 3.0

2021-11-23 Thread Kumar Mishra, Sanjeev
Hi, I am upgrading code from OpenSSL 1.0.2 to 3.0. We are programmatically loading and unloading FIPS and have separate module code for FIPS module. I have written code for main() and self_test_cb() as per the following manual- /docs/manmaster/man7/fips_module.html (openssl.org)

undefined symbol: SSL_SESSION_new in linking

2021-11-10 Thread Kumar Mishra, Sanjeev
Hi, I have used SSL_SESSION_new() and SSL_SESSION_free() API of OpenSSL3.0 while upgrading my code from 1.0.1 to 3.0. But I am getting following linking error.I have already included file in it.Please suggest changes /sonus/p4/ws/skumarmishra/openssl3/common/dist/bin/db64/Serialization

Help Required For Code Changes While Upgrading OpenSSL 1.0.1 to 3.0

2021-10-20 Thread Kumar Mishra, Sanjeev
Hi, I am upgrading the code from OpenSSL 1.0.1 to 3.0. I am getting following compilation errors. Could you please suggest appropriate changes for following- 1. X509err(X509_F_X509_STORE_ADD_CERT,ERR_R_MALLOC_FAILURE); error: 'X509err' was not declared in this scope 2. RSA *rsa = RSA_n

How to get "EVP_PKEY *dhpkey" from NID_X9_62_prime256v1.

2021-08-27 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 structure like "EC_KEY_new_by_curve_name()" , "SSL_CTX_set_tmp_ecdh()" and "EC_KEY"..etc. The code is like follows -- --- --- EC_KEY *ecdh = EC_KEY_new_by_cu

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

Not getting some macros for FIPS

2021-06-23 Thread Kumar Mishra, Sanjeev
Hi, I am upgrading the code of OpenSSL 1.0 to 3.0. I am not getting some macros for FIPS example - FIPS_TEST_INTEGRITY FIPS_R_PAIRWISE_TEST_FAILED FIPS_R_DRBG_STUCK etc. What is alternative of above macros ? How I work around this ? What header file do I need to include for these macro in Open

Not getting some macros for setting some BIO commands

2021-06-14 Thread Kumar Mishra, Sanjeev
Hi, I am upgrading the code of OpenSSL 1.0 to 3.0. I am not getting some macros for setting some BIO commands for example - BIO_CTRL_GET_PKT_COUNT BIO_CTRL_GET_PKT_LEN BIO_CTRL_SET_PKT_COUNT etc. What is alternative of above macros ? How I work around this ? Thanks With Best Regards, Sanjeev K

How to set the different parameters of X509_STORE_CTX structure.

2021-05-26 Thread Kumar Mishra, Sanjeev
Hi, I am upgrading the code of OpenSSL 1.0 to 3.0. I am not getting some API for setting some parameter of X509_STORE_CTX structure as it is opaque in 3.0. For example the code is like - X509_STORE_CTX *ctx; ctx->current_issuer = NULL; ctx->current_crl_score = 0; ctx->curren

Which header file I need to include for X509 OCSP Certificate Verification

2021-05-19 Thread Kumar Mishra, Sanjeev
Hi, Which header file I need to include for X509 OCSP Certificate Verification. I am getting compilation error for different structures and macros. Although, I am including following files- // #include #include #include #include #include // #include #include //

How to access different fields of structure SSL in OpenSSL 3.0

2021-05-10 Thread Kumar Mishra, Sanjeev
Hi, How to access different fields of structure SSL in OpenSSL 3.0 ? For example the code is like this - SSL *ssl; .. ... SSL_CTX_set_tlsext_status_cb(ssl->ctx, NULL); MRM_LOG_INFO("SSL_free ref %d ", ssl->references); Thanks With Best Regards, Sanjeev Kumar Mishra Notice: This e-mail t

How to switch between OpenSSL 1.0.2 and 1.1 in compilation loading and linking a C code.

2021-05-05 Thread Kumar Mishra, Sanjeev
Hi, In my Linux Debian server both OpenSSL 1.0.2 and 1.1 is installed. As a user I am compiling C code for 1.0.2. But at the runtime and linking and loading it is picking version 1.1 as default. How to switch between OpenSSL 1.0.2 and 1.1 in compilation loading and linking a C code ? Is there an

How to access different fields of typedef struct evp_pkey_st EVP_PKEY.

2021-04-20 Thread Kumar Mishra, Sanjeev
Hi, I am not getting different functions in OpenSSL 3.0 for accessing different fields of typedef struct evp_pkey_st EVP_PKEY. For Example - code is like this - EVP_PKEY * privKey; - - if ( BN_cmp(privKey->pkey.rsa->n, pubKey->pkey.rsa->n) != 0 ) else if ((privKey->type == EVP_PK