Re: [PHP-DEV] openssl module for php From: Wez Furlong (wez <email protected>)
Date: 05/04/01

On 2001-05-04 19:05:05, "spencer 'sporty' portee"
<sportee <email protected>> wrote:
> > On Fri, May 04, 2001 at 07:22:03PM +0200, Sascha Kettler wrote:
> > > You won't need to pass the algorithm by an arg, as the key already
contains
> > > the algorithm identification (pkey->type). I haven't used any DSA
encryption
> > > yet, but maybe you can just add the code to the switch statements.
>
> but if its pem encoded, you need to use a proper algorithm to read it
in,
no?
>
> ala PEM_ASN1_read_bio( ... )

 key = (EVP_PKEY *) PEM_ASN1_read_bio(
   (char *(*)())d2i_PrivateKey,
    PEM_STRING_EVP_PKEY, b,
    NULL, NULL, passphrase);

We currently use this code for the private key, so it looks like we don't
care what kind of key it is; openssl figures it out and we can find out by
looking at key->type.

Or am I missing something?

--Wez.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>