summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c521be)
raw | patch | inline | side by side (parent: 6c521be)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Dec 2008 07:37:55 +0000 (07:37 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Dec 2008 07:37:55 +0000 (07:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13217 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/mail/personal/mail/sieve/class_sieve.inc | patch | blob | history |
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc
index f1875d4459572a28b983f7eb62283fa85642df1c..290a96b052bdb1e8315916e683c297a957c9a28d 100644 (file)
/* Check if PHP supports TLS encryption for sockets
*/
if(function_exists("stream_socket_enable_crypto")){
+
+ /* Initiate TLS and get response
+ */
if (@ fputs ($this->fp, "STARTTLS\r\n") === false) {
$this->error_raw = "fputs() returned 'false'"; return (false);
} @ $linha = fgets ($this->fp, 1024); if ($linha === false) {
$this->error_raw = "fgets() returned 'false'"; return (false);
- } if (! preg_match ("/\\s*OK\\s/i", $linha)) {
+ }
+ if (! preg_match ("/\\s*OK\\s/i", $linha)) {
$this->error_raw = "expected an 'OK', but server replied: '" . trim ($linha) . "'"; return (false);
- } if (! @ stream_socket_enable_crypto ($this->fp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
+ }
+ if (! @ stream_socket_enable_crypto ($this->fp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
$this->error_raw = "stream_socket_enable_crypto() returned 'false'"; return (false);
}
}