You are not logged in.

#1 2018-08-10 22:31:05

atoms118
Member
Registered: 2018-08-10
Posts: 2

Missing functions in latest OpenSSL

Ok, I swear I must be missing something, but here goes.

I'm writing code that uses the OpenSSL function `EVP_PKEY_new_raw_private_key`. This function exists on GitHub and in the online docs, but it didn't on my local machine. After struggling for a while, I try installing `openssl-git` from the AUR and sure enough the function is actually there. This function isn't a new thing either; I may be mistaken but it seems this function has been around for a long time at this point. Of course, I'd rather not use `openssl-git` due to the version mismatch issues it created (not to mention, I can't expect end users of the code I'm writing to use it either), so I am using the latest `openssl` (not AUR); not sure what the package version is (sorry in advance), but `openssl version` gives me `OpenSSL 1.1.0h  27 Mar 2018` which seems to match up with the latest version according to the web. I tried `sudo grep EVP_PKEY_new_raw_private_key /usr` and I get nothing, and of course there's also the fact that I get compiler warnings & linker errors when using said function (to be clear, I do not get any warnings or errors when using openssl-git).

Am I just missing something really stupid, or is the openssl package missing functions? Furthermore, could anybody suggest how I might fix this issue?

Offline

#2 2018-08-10 22:40:48

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: Missing functions in latest OpenSSL

These functions will only be available with the release of 1.1.1. I think currently you should use EVP_PKEY_new_mac_key.

https://www.openssl.org/docs/man1.1.1/m … Y_new.html
EVP_PKEY_new_mac_key() works in the same way as EVP_PKEY_new_raw_private_key(). New applications should use EVP_PKEY_new_raw_private_key() instead.

...

EVP_PKEY_new_raw_private_key(), EVP_PKEY_new_raw_public_key() and EVP_PKEY_new_CMAC_key() were first added to OpenSSL 1.1.1.

Last edited by progandy (2018-08-10 22:44:19)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2018-08-10 22:42:59

atoms118
Member
Registered: 2018-08-10
Posts: 2

Re: Missing functions in latest OpenSSL

Wow, can't believe I didn't catch that. Thanks for the quick response though

Offline

Board footer

Powered by FluxBB