Wim Lewis pisze:
> On 27 Mar 2012, at 3:01 AM, Frater wrote:
>   
>> Where is any working example to encrypt file or long string using RSA Public 
>> or private key.
>> in demos/maurice is example 1 but using certificate not privkey.
>>     
>
> The code in demos/maurice reads a certificate and extracts an EVP_PKEY from 
> it, which is used by the rest of the example. Presumably any other method of 
> getting an EVP_PKEY would work equally well.
>
>   
Hm... meybe it is simple ;) but not for me.


I generate keys using this code: http://dark-code.bulix.org/8fb7pp-81282
I generate 2 keys: priv1.pem and priv2.pem  (and pub1.pem & pub2.pem of
course)
1=my keys
2=other person key (I can use only pub2.pem key)

My question is:
What encrypt message to 2 person using my 1 keys.

encrypt(string, pub2.pem and my priv1.pem);

Please write to me a simple example or show me code on internet.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to