php and openss functions
- From: Harry Knitter <harry@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 29 Jun 2005 10:00:27 +0200
Hello,
I´m trying to extract an private key from a server certificate.
$server_pwd="password";
$server_cert="/path/to/certificate";
$fp=fopen($server_cert,"rb");
$certificate=fread($fp,filesize($server_cert));
fclose($fp);
echo "<BR>$certificate";
echo "<BR>";
$key_id=openssl_get_privatekey($certificate,$server_pwd);
echo "<BR>";
echo openssl_error_string();
The certificate is read. Extraction of the private key fails, however.
openssl_error_string() tells:
error:0906D06C:PEM routines:PEM_read_bio:no start line
What´s wrong??
Thanks
Harry
.
- Follow-Ups:
- Re: php and openss functions
- From: Steve
- Re: php and openss functions
- Prev by Date: Re: Dumb Question of the day (maybe year)
- Next by Date: Re: php and openss functions
- Previous by thread: Arabic Text & ImageTtfText
- Next by thread: Re: php and openss functions
- Index(es):
Relevant Pages
|