Skip to content

engine: add static GOST engine support with explicit OpenSSL binding - #535

Open
legale wants to merge 1 commit into
gost-engine:masterfrom
legale:master
Open

engine: add static GOST engine support with explicit OpenSSL binding#535
legale wants to merge 1 commit into
gost-engine:masterfrom
legale:master

Conversation

@legale

@legale legale commented Aug 18, 2026

Copy link
Copy Markdown

ENGINE_load_gost() previously created and added the GOST engine to OpenSSL, but did not explicitly register its PKEY ASN.1 methods.

This was sufficient for the dynamic engine loading path, but incomplete for direct library/static use where the program
calls ENGINE_load_gost() itself.

As a result, the engine could be found with
ENGINE_by_id("gost"), while GOST-2012 key ASN.1 methods were still unavailable to libcrypto.
This also caused GOST TLS cipher suites to be rejected by SSL_CTX_set_cipher_list().

Register the engine PKEY ASN.1 methods explicitly after ENGINE_add() so static and library builds expose GOST-2012 keys correctly and can use GOST TLS cipher suites.

ENGINE_load_gost() previously created and added the GOST engine to OpenSSL,
but did not explicitly register its PKEY ASN.1 methods.

This was sufficient for the dynamic engine loading path,
but incomplete for direct library/static use where the program
 calls ENGINE_load_gost() itself.

As a result, the engine could be found with
ENGINE_by_id("gost"), while GOST-2012 key ASN.1 methods
were still unavailable to libcrypto.
This also caused GOST TLS cipher suites to be rejected by SSL_CTX_set_cipher_list().

Register the engine PKEY ASN.1 methods explicitly after ENGINE_add()
so static and library builds expose GOST-2012 keys correctly
and can use GOST TLS cipher suites.

Signed-off-by: Ruslan Isaev <legale.legale@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant