8000 cc3200: Force SSL method to be TLSV1. · russbot/circuitpython@8cee03b · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 8cee03b

Browse files
author
danicampora
committed
cc3200: Force SSL method to be TLSV1.
The default setting of using the "highest" method available doesn't work with some servers like Microsoft Azure. TLSV1 seems to work with pretty much any server.
1 parent 1673e19 commit 8cee03b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cc3200/mods/modussl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ STATIC mp_obj_t mod_ssl_wrap_socket(mp_uint_t n_args, const mp_obj_t *pos_args,
103103

104104
_i16 sd = ((mod_network_socket_obj_t *)args[0].u_obj)->sock_base.sd;
105105
_i16 _errno;
106+
_u8 method = SL_SO_SEC_METHOD_TLSV1;
107+
if ((_errno = sl_SetSockOpt(sd, SL_SOL_SOCKET, SL_SO_SECMETHOD, &method, sizeof(method))) < 0) {
108+
goto socket_error;
109+
}
106110
if (keyfile && (_errno = sl_SetSockOpt(sd, SL_SOL_SOCKET, SL_SO_SECURE_FILES_PRIVATE_KEY_FILE_NAME, keyfile, strlen(keyfile))) < 0) {
107111
goto socket_error;
108112
}

0 commit comments

Comments
 (0)
0