Permalink
Browse files

fixed SSL constants

  • Loading branch information...
dinhviethoa committed Mar 23, 2012
1 parent 73cbb3c commit 0149dd569e3e5aa556e502091500151c09f3e672
Showing with 14 additions and 2 deletions.
  1. +13 −1 src/data-types/mailstream_cfstream.c
  2. +1 −1 src/data-types/mailstream_cfstream.h
@@ -295,6 +295,12 @@ static void readStreamCallback(CFReadStreamRef stream, CFStreamEventType eventTy
case STATE_WAIT_IDLE:
cfstream_data->state = STATE_IDLE_DONE;
break;
+ case STATE_WAIT_SSL:
+ cfstream_data->state = STATE_SSL_READ_DONE;
+ break;
+ case STATE_SSL_WRITE_DONE:
+ cfstream_data->state = STATE_SSL_WRITE_READ_DONE;
+ break;
}
break;
case kCFStreamEventEndEncountered:
@@ -375,6 +381,12 @@ static void writeStreamCallback(CFWriteStreamRef stream, CFStreamEventType event
case STATE_WAIT_WRITE:
cfstream_data->state = STATE_OPEN_WRITE_DONE;
break;
+ case STATE_WAIT_SSL:
+ cfstream_data->state = STATE_SSL_WRITE_DONE;
+ break;
+ case STATE_SSL_READ_DONE:
+ cfstream_data->state = STATE_SSL_READ_WRITE_DONE;
+ break;
}
break;
case kCFStreamEventEndEncountered:
@@ -863,7 +875,7 @@ int mailstream_cfstream_set_ssl_enabled(mailstream * s, int ssl_enabled)
case MAILSTREAM_CFSTREAM_SSL_LEVEL_SSLv2:
CFDictionarySetValue(settings, kCFStreamSSLLevel, kCFStreamSocketSecurityLevelSSLv2);
break;
- case MAILSTREAM_CFSTREAM_SSL_LEVEL_SSLv1:
+ case MAILSTREAM_CFSTREAM_SSL_LEVEL_SSLv3:
CFDictionarySetValue(settings, kCFStreamSSLLevel, kCFStreamSocketSecurityLevelSSLv3);
break;
case MAILSTREAM_CFSTREAM_SSL_LEVEL_TLSv1:
@@ -56,7 +56,7 @@ extern "C" {
enum {
MAILSTREAM_CFSTREAM_SSL_LEVEL_NONE,
MAILSTREAM_CFSTREAM_SSL_LEVEL_SSLv2,
- MAILSTREAM_CFSTREAM_SSL_LEVEL_SSLv1,
+ MAILSTREAM_CFSTREAM_SSL_LEVEL_SSLv3,
MAILSTREAM_CFSTREAM_SSL_LEVEL_TLSv1,
MAILSTREAM_CFSTREAM_SSL_LEVEL_NEGOCIATED_SSL
};

0 comments on commit 0149dd5

Please sign in to comment.