Skip to content

Commit

Permalink
Force use of TLS 1.3 in OpenSSL demos
Browse files Browse the repository at this point in the history
  • Loading branch information
archigup committed Oct 10, 2024
1 parent fa50223 commit f4306de
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions platform/posix/transport/src/openssl_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,17 @@ OpensslStatus_t Openssl_Connect( NetworkContext_t * pNetworkContext,
}
}

/* Set minimum TLS version. */
if( returnStatus == OPENSSL_SUCCESS )
{
int ret = SSL_CTX_set_min_proto_version(pSslContext, TLS1_3_VERSION);
if(ret != 1)
{
LogError( ( "Failed to set minimum TLS version to 1.3." ) );
returnStatus = OPENSSL_API_ERROR;
}
}

/* Setup credentials. */
if( returnStatus == OPENSSL_SUCCESS )
{
Expand Down

0 comments on commit f4306de

Please sign in to comment.