> From: owner-openssl-us...@openssl.org On Behalf Of Salz, Rich > Sent: Friday, 29 March, 2013 11:47
> > 1) Put a base64-encoded key (the normal one generated by > openssl command line tools) into a header file > > Avoid a step. Base64 decode and using something like "od" > put a binary bytestream into your source. Like > unsigned char der_key[] = { 3, 12, 253, .... } > If you do use od octal, remember to force a leading 0 on each byte that doesn't already have one, and maybe them too for simplicity. Or if you use hex, 0x on every byte over 9, ditto. > > 2) Compile code with this key which will public-key encrypt > a message. > > Convert it into an RSA structure using d2i_XXX routines. > The commandline default is PUBKEY, and d2i_PUBKEY returns an EVP_PKEY >wrapping< an RSA suitable for EVP_Seal* per elsethread. Or d2i_RSA_PUBKEY "downcasts" to RSA suitable for lowlevel RSA_public_encrypt etc. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org