]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorDaniel Lowrey <rdlowrey@php.net>
Thu, 5 Mar 2015 06:00:59 +0000 (23:00 -0700)
committerDaniel Lowrey <rdlowrey@php.net>
Thu, 5 Mar 2015 06:00:59 +0000 (23:00 -0700)
* PHP-5.6:
  hexadecimal is case*in*sensitive

Conflicts:
ext/openssl/xp_ssl.c

1  2 
ext/openssl/xp_ssl.c

index 20ebda2336f5779538a63a8c2dbaabc9c7fd9f98,47869742392722c0354110d5b36f35b9994b6a0f..3fad16ee0250e5151d66b1156bace6a5a9f0d174
@@@ -306,15 -268,15 +306,15 @@@ static int verify_callback(int preverif
  }
  /* }}} */
  
 -static int php_x509_fingerprint_cmp(X509 *peer, const char *method, const char *expected TSRMLS_DC)
 +static int php_x509_fingerprint_cmp(X509 *peer, const char *method, const char *expected)
  {
 -      char *fingerprint;
 -      int fingerprint_len;
 +      zend_string *fingerprint;
        int result = -1;
  
 -      if (php_openssl_x509_fingerprint(peer, method, 0, &fingerprint, &fingerprint_len TSRMLS_CC) == SUCCESS) {
 -              result = strcasecmp(expected, fingerprint);
 -              efree(fingerprint);
 +      fingerprint = php_openssl_x509_fingerprint(peer, method, 0);
 +      if (fingerprint) {
-               result = strcmp(expected, fingerprint->val);
++              result = strcasecmp(expected, fingerprint->val);
 +              zend_string_release(fingerprint);
        }
  
        return result;