Re: assymetric encryption functions based on OpenSSL
| From: | Andi Gutmans | Date: | Mon, 13 Nov 2000 20:28:58 +0000 |
| Subject: | Re: assymetric encryption functions based on OpenSSL | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37997@lists.php.net to get a copy of this message | ||
In my opinion, the whole issue of where we actually get the info from should probably be left out and we should pass strings. Read the certificate into a string before that.
In general (and this isn't always true) the less PHP functions mess with PHP's fopen-wrappers the better. Also making it use strings is nice because of databases and other ways of passing data. I would not want the functions behavior to change according to if it is sent a string or an fp.
Also the x509 stuff can probably be hidden from the end user inside the other functions.
Andi
At 02:20 PM 11/13/00 -0600, Andrei Zmievski wrote:
On Mon, 13 Nov 2000, Stig Venaas wrote: The advantage of the current way is that you can do: $fp = fopen("http://www.www.ww/cert.pem"); $x509 = openssl_read_x509($fp); How about both? I can check whether it's a string or a resource. Sorry, but how is it better than: $x509 = openssl_read_x509("http://www.www.ww/cert.pem"); -Andrei Give a man a fish; you have fed him for today. Teach a man to fish; and you can sell him fishing equipment.--- Andi Gutmans <andi@zend.com> http://www.zend.com/-Author unknown-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net