PEM_read_bio_PrivateKey(BIO *KeyFile ,NULL,yourcallback)

where yourcallback is :
static int MS_CALLBACK yourcallback(char *buf, int num, int verify)
{
                
        strncpy(buf,yourhardcodedpassword,num-1);
        return(strlen(buf));

}

;>


> I'm using OpenSSL 0.9.2....
> I use PEM_read_PrivateKey() / PEM_write_PrivateKey() to read/write my
> private key from/to a diskette. I would like encrypt/decrypt the key
when
> writing/reading to/from the diskette.
> I'm only looking for a "simple" encryption with a key hardcoded in to
my
> application.
>  
> Can this be done using OpenSSL ?
>  
> I know the answer is probably yes :-) so if anyone could give me an
example
> of how to do this, I would really appreciate it.
>  
> > Best regards
> >  
> > Kim Hellan
> > KMD
> > Niels Bohrs Alle 185
> > DK-5220 Odense SŲ
> > Phone: (+45) 44 60 52 54 (direct)
> > Fax (+45) 44 60 52 76
> > Mailto:[EMAIL PROTECTED]
> >  
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
>  
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to