close(fd);
return 1;
}
- tls = tls_socket_create(FALSE, server, client, fd, cache, TRUE);
+ tls = tls_socket_create(FALSE, server, client, fd, cache, TLS_1_2, TRUE);
if (!tls)
{
close(fd);
}
DBG1(DBG_TLS, "%#H connected", host);
- tls = tls_socket_create(TRUE, server, NULL, cfd, cache, TRUE);
+ tls = tls_socket_create(TRUE, server, NULL, cfd, cache, TLS_1_2, TRUE);
if (!tls)
{
close(fd);
/* open TLS socket */
this->tls = tls_socket_create(FALSE, server_id, client_id, this->fd,
- NULL, FALSE);
+ NULL, TLS_1_2, FALSE);
if (!this->tls)
{
DBG1(DBG_TNC, "creating TLS socket failed");
}
this->tls = tls_socket_create(FALSE, this->server, this->client, fd,
- NULL, FALSE);
+ NULL, TLS_1_2, FALSE);
if (!this->tls)
{
close(fd);
.destroy = _destroy,
},
.state = PT_TLS_SERVER_VERSION,
- .tls = tls_socket_create(TRUE, server, NULL, fd, NULL, FALSE),
+ .tls = tls_socket_create(TRUE, server, NULL, fd, NULL, TLS_1_2, FALSE),
.tnccs = (tls_t*)tnccs,
.auth = auth,
);
*/
tls_socket_t *tls_socket_create(bool is_server, identification_t *server,
identification_t *peer, int fd, tls_cache_t *cache,
- bool nullok)
+ tls_version_t max_version, bool nullok)
{
private_tls_socket_t *this;
tls_purpose_t purpose;
free(this);
return NULL;
}
+ this->tls->set_version(this->tls, max_version);
return &this->public;
}
* @param peer client identity, NULL for no client authentication
* @param fd socket to read/write from
* @param cache session cache to use, or NULL
+ * @param max_version maximun TLS version to negotiate
* @param nullok accept NULL encryption ciphers
* @return TLS socket wrapper
*/
tls_socket_t *tls_socket_create(bool is_server, identification_t *server,
identification_t *peer, int fd, tls_cache_t *cache,
- bool nullok);
+ tls_version_t max_version, bool nullok);
#endif /** TLS_SOCKET_H_ @}*/