0

Hello i use this function for cryptography:

int RSA_public_encrypt(int flen, const unsigned char *from,unsigned char *to, RSA *rsa, int padding);

https://www.openssl.org/docs/manmaster/man3/RSA_public_encrypt.html

I set padding RSA_PKCS1_OAEP_PADDING. Problem is when I compile my project: gcc myproject.c -DPKCS_TESTVECT -o test

I use -DPKCS_TESTVECT macro when I compile program, this macro is defined in crypto/rsa/rsa_oaep.c line 67 in OpenSSL library.

I compile my project the macro wasn't recognized and test vectors have not been assigned into my project.

Thanks for answers

kiner_shah
  • 3,939
  • 7
  • 23
  • 37
  • Can you specify the exact compilation command with all options? – kiner_shah Nov 04 '21 at 10:55
  • 2
    What version of OpenSSL are you using? The PKCS_TESTVECT macro is an internal macro that can be used for testing the library. It's not meant to be used by applications. It doesn't exist in OpenSSL 1.1.0 or later (1.0.2 or before). If you do want to use it, you have to specify it when you compile *OpenSSL* not when you compile your *application*. Probably you really shouldn't use this. – Matt Caswell Nov 04 '21 at 11:36
  • exact compilation command is: gcc myproject.c -o myproject -DPKCS_TESTVECT -lcrypto OPENSSL Version: 1.1.1 Exist other way how i add TEST vectors ? – Martin Janitor Nov 04 '21 at 12:06

0 Answers0