Re: OpenSSL in PHP
| From: | derick@php.net | Date: | Thu, 19 Sep 2002 13:32:10 +0000 |
| Subject: | Re: OpenSSL in PHP | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-88457@lists.php.net to get a copy of this message | ||
Hello again,
some more comments:
@@ -1951,11 +2196,14 @@
char * filename; long filename_len;
char * extracerts = NULL; long extracerts_len;
char * signersfilename = NULL; long signersfilename_len;
+ char *contfile=NULL; long contfile_len;
+ int informat = FORMAT_SMIME;
RETVAL_LONG(-1);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|sas", &filename,
&filename_len,
- &flags, &signersfilename, &signersfilename_len,
&cainfo,
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll|ssas", &filename,
+ &filename_len, &informat, &flags, &contfile,
&contfile_len,
+ &signersfilename, &signersfilename_len, &cainfo,
&extracerts, &extracerts_len) == FAILURE)
return;
this change breaks BC, the parameter signature is now a lot different.
I'm afraid that we can't have that happening.
2. Please don't use goto if it's not _really_ needed. You can easily
change:
+ if (req == NULL) {
+ zend_error(E_WARNING, "unable to load X509
request\n");
+ RETVAL_LONG(-1);
+ goto end;
+ }
to
+ if (req == NULL) {
+ zend_error(E_WARNING, "unable to load X509 request\n");
+ RETVAL_RETURN(-1);
+ }
and:
+ if (i < 0) {
+ goto end;
+ } else if (i == 0) {
+ zend_error(E_WARNING, "verify failure\n");
+ RETVAL_LONG(-1);
+ } else {
+ RETVAL_TRUE;
+ }
to
+ if (i == 0) {
+ zend_error(E_WARNING, "verify failure\n");
+ RETVAL_LONG(-1);
+ } else {
+ RETVAL_TRUE;
+ }
3. Please use phperror_docref (and omit the trailing \n from messages).
See the CODING_STANDARDS file in CVS on how to use the phperror_docref()
function.
regards,
Derick
On Thu, 19 Sep 2002, Wojtek Slusarczyk wrote:
> On Thu, 19 Sep 2002 derick@php.net wrote:
>
> > hmm, I still see this in the patch @
> > ftp://ftp.certum.pl/pub/PHP/php-4.2.3-openssl.diff.gz :
> ............
> > Am I checking the wrong patch?
>
> Yeah, this is for end-user ;)
>
> CVS version is php-cvs-openssl.diff.gz
> --
> Wojtek ¦lusarczyk
>
---------------------------------------------------------------------------
Derick Rethans http://derickrethans.nl/
JDI Media Solutions
-----------------------------[ zak@mysql.com: Databases are for Assholes ]-