Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8273607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:31:52+00:00 2026-06-08T07:31:52+00:00

I have a problem with statically linked openSSL library and GOST crypto engine. I

  • 0

I have a problem with statically linked openSSL library and GOST crypto engine.

I have simple client/server application using GOST keys and certificates.
It works fine with GOST keys but only if I use dynamically linked version of openSSL library.
If I try to use statically linked openSSL I got an error message.

This is openSSL library initialization calls:

OPENSSL_config("correct config file path");

SSL_library_init();

SSL_load_error_strings();

When I try to read certificate file I got an error.

SSL_CTX_use_certificate_chain_file(ctx, CERTFILE)

Return value here is not 1. So this is an error.

The human readable error message is:

3084809868:error:0609E09C:digital envelope
routines:PKEY_SET_TYPE:unsupported algorithm:p_lib.c:239:
3084809868:error:0B07706F:x509 certificate
routines:X509_PUBKEY_get:unsupported algorithm:x_pubkey.c:155:
3084809868:error:140BF10C:SSL routines:SSL_SET_CERT:x509
lib:ssl_rsa.c:402:

When I use the same code with dynamically linked openSSL library with external GOST engine library everything works fine.
So what is the difference between static and dynamic version?
The only idea that I have at this time that my library initialization sequence is wrong.

I checked symbols in the compiled libcrypto.a library.

nm ./libcrypto.a | grep gost

This command gave me output with many GOST function which were included to libcrypto.a library.
So I think that library was compiled properly and all GOST engine functions were included in the static library.

"Unsupported algorithm" error message means that GOST functions was not initialized properly.
The question is: how properly initialize engines with statically linked openSSL?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:31:53+00:00Added an answer on June 8, 2026 at 7:31 am

    The correct solution for using GOST engine and statically linked openssl is:

    Make sure that openssl.cnf is exists in default directory.
    (If we configure our library like this “./config –prefix = /gost-ssl-static” the default configuration library will be /gost-ssl-static/ssl) (See http://www.cryptocom.ru/opensource/openssl100.html for details)
    Make sure that openssl.cnf contains the following lines before first section with square brackets:

    [openssl_def]
    engines=engine_section
    
    [engine_section]
    gost=gost_section
    
    [gost_section]
    engine_id=gost
    default_algorithms=ALL
    CRYPT_PARAMS=id-Gost28147-89-CryptoPro-A-ParamSet
    

    Init openSSL library and gost engine:

    OPENSSL_config(NULL); 
    SSL_library_init();
    SSL_load_error_strings();
    

    My mistake was incorrect OpenSSL initialization.
    My initialization code was much more complicated.
    Many unnecessary function calls interferes to each other and gost engine was initialized.
    Also I thought that the only parameter in OPENSSL_config(NULL) function means path to openssl.cnf file.
    It was wrong suggestion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a library compiled into a .a file, linked against my application. (iphone,
I have a problem with statically linking dll files into project. I'm using Builder
I have created a communication library which is linked statically into several different applications.
I have a weird problem. I am working on a shared library, written using
I have a problem with my application that is using uiwebview to load the
I have problem with my query on C, I’m using the oci8 driver. This
I have problem with show or hide form in Window Form Application. I start
I have a rather simple C++ project, which uses boost::regex library. The output I'm
I have an application that statically links to libpython.a (2.7). From within the application's
I have a problem with an application I'm debugging. Steady state memory usage is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.