Avoid throwing a DES salt deprecation warning if the libc crypt
implementation is used.
{
char *crypt_res;
zend_string *result;
+
+ if (salt[0] == '*' && (salt[1] == '0' || salt[1] == '1')) {
+ return NULL;
+ }
+
/* Windows (win32/crypt) has a stripped down version of libxcrypt and
a CryptoApi md5_crypt implementation */
#if PHP_USE_PHP_CRYPT_R
ZEND_SECURE_ZERO(output, PHP_MAX_SALT_LEN + 1);
return result;
}
- } else if (salt[0] == '*' && (salt[1] == '0' || salt[1] == '1')) {
- return NULL;
} else {
/* DES Fallback */