mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
* Source/GSSocketStream.m (-initWithInput:output:): Attempt to
replace deprecated GNUTLS functions with newer ones for GNUTLS >= 2.12. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34390 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
eaed3df26b
commit
6f2aee3252
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-01-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/GSSocketStream.m (-initWithInput:output:): Attempt to
|
||||||
|
replace deprecated GNUTLS functions with newer ones for GNUTLS >= 2.12.
|
||||||
|
|
||||||
2012-01-02 Fred Kiefer <FredKiefer@gmx.de>
|
2012-01-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSArray.m (-objectsAtIndexes:): Fix comparision of
|
* Source/NSArray.m (-objectsAtIndexes:): Fix comparision of
|
||||||
|
|
|
@ -656,6 +656,7 @@ static gnutls_anon_client_credentials_t anoncred;
|
||||||
|
|
||||||
if ([proto isEqualToString: NSStreamSocketSecurityLevelTLSv1] == YES)
|
if ([proto isEqualToString: NSStreamSocketSecurityLevelTLSv1] == YES)
|
||||||
{
|
{
|
||||||
|
#if GNUTLS_VERSION_NUMBER < 0x020C00
|
||||||
const int proto_prio[4] = {
|
const int proto_prio[4] = {
|
||||||
#if defined(GNUTLS_TLS1_2)
|
#if defined(GNUTLS_TLS1_2)
|
||||||
GNUTLS_TLS1_2,
|
GNUTLS_TLS1_2,
|
||||||
|
@ -664,13 +665,20 @@ static gnutls_anon_client_credentials_t anoncred;
|
||||||
GNUTLS_TLS1_0,
|
GNUTLS_TLS1_0,
|
||||||
0 };
|
0 };
|
||||||
gnutls_protocol_set_priority (session, proto_prio);
|
gnutls_protocol_set_priority (session, proto_prio);
|
||||||
|
#else
|
||||||
|
gnutls_priority_set_direct(session, "NORMAL:-VERS-SSL3.0:+VERS-TLS-ALL", NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if ([proto isEqualToString: NSStreamSocketSecurityLevelSSLv3] == YES)
|
if ([proto isEqualToString: NSStreamSocketSecurityLevelSSLv3] == YES)
|
||||||
{
|
{
|
||||||
|
#if GNUTLS_VERSION_NUMBER < 0x020C00
|
||||||
const int proto_prio[2] = {
|
const int proto_prio[2] = {
|
||||||
GNUTLS_SSL3,
|
GNUTLS_SSL3,
|
||||||
0 };
|
0 };
|
||||||
gnutls_protocol_set_priority (session, proto_prio);
|
gnutls_protocol_set_priority (session, proto_prio);
|
||||||
|
#else
|
||||||
|
gnutls_priority_set_direct(session, "NORMAL:-VERS-TLS-ALL:+VERS-SSL3.0", NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -693,7 +701,9 @@ static gnutls_anon_client_credentials_t anoncred;
|
||||||
|
|
||||||
/* Set transport layer to use our low level stream code.
|
/* Set transport layer to use our low level stream code.
|
||||||
*/
|
*/
|
||||||
|
#if GNUTLS_VERSION_NUMBER < 0x020C00
|
||||||
gnutls_transport_set_lowat (session, 0);
|
gnutls_transport_set_lowat (session, 0);
|
||||||
|
#endif
|
||||||
gnutls_transport_set_pull_function (session, GSTLSPull);
|
gnutls_transport_set_pull_function (session, GSTLSPull);
|
||||||
gnutls_transport_set_push_function (session, GSTLSPush);
|
gnutls_transport_set_push_function (session, GSTLSPush);
|
||||||
gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t)self);
|
gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t)self);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue