>>As far as I understood the main idea of this code is to get engine and initialize it by ENGINE_init(e).
My code was only for testing of loading and initialization of specific ENGINE.
>>What is the further use of this ENGINE* pointer? It seems that i can "forget" about it
Variable with type ENGINE can be used directly in many cryptography functions, such as EVP_EncryptInit_ex and many
others.
>>The code was executed without errors but SSL_CTX_use_certificate_chain_file(ctx, CERTFILE) function call cause the
>>same error: Unsupported algorithm.
So, if "gost" engine is successfully loaded, then try this code:
SSL_load_error_strings();
ENGINE *e;
const char *engine_id = "gost";
ENGINE_load_openssl();
ENGINE_load_gost();
e = ENGINE_by_id(engine_id);
if(!e)
{
//the engine isn't available
ERR_print_errors(bf_log);
return 1;
}
ENGINE_register_complete(e);
OpenSSL_add_all_algorithms();
SSL_library_init();
//here is your code
//at the end of the program
ENGINE_free(e);
ENGINE_cleanup();
------------------------------------------------------------------------------------------------------------------------------------
From: Abyss Lingvo
Sent: Friday, June 15, 2012 10:34 AM
Hi Vladimir,
I have inserted your code into my application between
OPENSSL_config("correct config file path");
SSL_library_init();
SSL_load_error_strings();
and
SSL_CTX_use_certificate_chain_file(ctx, CERTFILE)
The code was executed without errors but SSL_CTX_use_certificate_chain_file(ctx, CERTFILE) function call cause the same
error: Unsupported algorithm.
As far as I understood the main idea of this code is to get engine and initialize it by ENGINE_init(e).
What is the further use of this ENGINE* pointer? It seems that i can "forget" about it.
Why ENGINE_init(e) call is not necessary for dynamic linkage?
I thought that everything should be the same because I pass correct configuration file path to OPENSSL_config("correct
config file path");
I read "Network security with openssl" book and CryptoKom documentation
http://www.cryptocom.ru/products/cryptopacket.html#docs
Unfortunately both sources doesn't contain information how to handle with engines (especially in case of statically
linkage).