From: Johannes R. <joh...@sw...> - 2016-03-24 16:15:41
|
Hi all, I want to extract the public key and use it for encryption with OpenSSL. It works fine like this: pkcs15-tool --read-public-key keyid -o publickey.pem openssl rsautl -inkey publickey.pem -pubin -encrypt -pkcs -in plaintext.txt -out ciphertext.txt But when I use pkcs11-tool the exported key is kind of weird. I am using: pkcs11-tool --read-object --type pubkey --id keyid -o publickey.key I am trying to use publickey.key as the inkey for openssl rsautil -encrypt, but I always get an error from OpenSSL. Any ideas? Thanks in advance Johannes |