Make server-tls13.c and client-tls13.c quantum-safe.
parent
59dc4f482b
commit
ab92c0ae4a
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#define DEFAULT_PORT 11111
|
#define DEFAULT_PORT 11111
|
||||||
|
|
||||||
#define CERT_FILE "../certs/ca-cert.pem"
|
#define CERT_FILE "../certs/falcon_level5_root_cert.pem"
|
||||||
|
|
||||||
#if defined(WOLFSSL_TLS13) && defined(HAVE_SECRET_CALLBACK)
|
#if defined(WOLFSSL_TLS13) && defined(HAVE_SECRET_CALLBACK)
|
||||||
|
|
||||||
|
@ -185,6 +185,13 @@ int main(int argc, char** argv)
|
||||||
ret = -1; goto exit;
|
ret = -1; goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = wolfSSL_UseKeyShare(ssl, WOLFSSL_P521_KYBER_LEVEL5);
|
||||||
|
if (ret < 0) {
|
||||||
|
fprintf(stderr, "ERROR: failed to set the requested group to "
|
||||||
|
"P521_KYBER_LEVEL5.\n");
|
||||||
|
ret = -1; goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
/* Attach wolfSSL to the socket */
|
/* Attach wolfSSL to the socket */
|
||||||
if ((ret = wolfSSL_set_fd(ssl, sockfd)) != WOLFSSL_SUCCESS) {
|
if ((ret = wolfSSL_set_fd(ssl, sockfd)) != WOLFSSL_SUCCESS) {
|
||||||
fprintf(stderr, "ERROR: Failed to set the file descriptor\n");
|
fprintf(stderr, "ERROR: Failed to set the file descriptor\n");
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
|
|
||||||
#define DEFAULT_PORT 11111
|
#define DEFAULT_PORT 11111
|
||||||
|
|
||||||
#define CERT_FILE "../certs/server-cert.pem"
|
#define CERT_FILE "../certs/falcon_level5_entity_cert.pem"
|
||||||
#define KEY_FILE "../certs/server-key.pem"
|
#define KEY_FILE "../certs/falcon_level5_entity_key.pem"
|
||||||
|
|
||||||
|
|
||||||
#if defined(WOLFSSL_TLS13) && defined(HAVE_SECRET_CALLBACK)
|
#if defined(WOLFSSL_TLS13) && defined(HAVE_SECRET_CALLBACK)
|
||||||
|
@ -229,6 +229,13 @@ int main(int argc, char** argv)
|
||||||
ret = -1; goto exit;
|
ret = -1; goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = wolfSSL_UseKeyShare(ssl, WOLFSSL_P521_KYBER_LEVEL5);
|
||||||
|
if (ret < 0) {
|
||||||
|
fprintf(stderr, "ERROR: failed to set the requested group to "
|
||||||
|
"P521_KYBER_LEVEL5.\n");
|
||||||
|
ret = -1; goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
/* Attach wolfSSL to the socket */
|
/* Attach wolfSSL to the socket */
|
||||||
wolfSSL_set_fd(ssl, mConnd);
|
wolfSSL_set_fd(ssl, mConnd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue