<p>Not sure this is the proper way to use this mailing system? My source can be viewed at: mt-umunhum-wireless.net/Sources/rsa/rsa.c What version of openssl? I'm guessing 1.0.2. Put this line inyour code ERR_load_ERR_strings(); And youll get a more informative message. I'm using: openssl version OpenSSL 1.0.1t 3 May 2016 My main guess is that your allocation for the PEM buffer is too small -- is key/key_len pointing to a static buffer? -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users