If openssl is >=1.1, then https://pastebin.com/pUDTCjth OpenSSL 1.1.0 changed the visibility of a lot of struct members. You can no longer access the members directly https://stackoverflow.com/questions/40549318/error-invalid-use-of-incomplete-type-rsa-aka-struct-rsa-st-in-openssl-1-1/40550964#40550964