php/php-src — pull request #469 by mj (2013-09-21 19:37:19+00:00)
Title: Streams: Configure crypto method for ssl:// transports

Streams for ssl:// transports can now be configured to use a specific crypto method (SSLv3, SSLv2 etc.) by calling

```php
stream_context_set_option($ctx, "ssl", "crypto_method", $crypto_method)
```

where `$crypto_method` can be one of

- `STREAM_CRYPTO_METHOD_SSLv2_CLIENT`
- `STREAM_CRYPTO_METHOD_SSLv3_CLIENT`
- `STREAM_CRYPTO_METHOD_SSLv23_CLIENT`
- `STREAM_CRYPTO_METHOD_TLS_CLIENT`

SSLv23 remains the default crypto method.

Among other situations, this change makes it possible to `fopen()` URLs on an SSL server that only supports SSL v3: Previously the streams behind this always used `STREAM_CRYPTO_METHOD_SSLv23_CLIENT` which can now be overridden using the context option.