Lipovlan / cng-openssl-provider

OpenSSL provider using Windows Cryptography API: Next Generation
MIT License
6 stars 6 forks source link

Use OpenSSL error methods #1

Open Lipovlan opened 1 year ago

Lipovlan commented 1 year ago

OpenSSL has function that core passes to the provider such as OSSL_FUNC_CORE_NEW_ERROR, OSSL_FUNC_CORE_SET_ERROR_DEBUG or OSSL_FUNC_CORE_VSET_ERROR. These should be used instead of the crude debug.h functions currently implemented.

levitte commented 1 year ago

You might have some use of https://github.com/provider-corner/libprov, which is a very light weight library to help with some common things I've found. You can have it a submodule, add add_subdirectory(libprov) in CMakeLists.txt and link your provider with libprov, or you can copy err.h and err.c and adapt them to your liking (they're licensed CC0, so not encumbering at all).

Lipovlan commented 1 year ago

Thanks, that looks neat!