ready for publishing
parent
9a19a43e8a
commit
d14c8511bb
|
@ -71,15 +71,15 @@ void AwaitDGram()
|
||||||
{
|
{
|
||||||
int on = 1;
|
int on = 1;
|
||||||
int res = 1;
|
int res = 1;
|
||||||
int recvlen; /* length of string read */
|
int recvlen; /* length of string read */
|
||||||
int readWriteErr;
|
int readWriteErr;
|
||||||
int listenfd = 0; /* Initialize our socket */
|
int listenfd = 0; /* Initialize our socket */
|
||||||
int clientfd = 0; /* client connection */
|
int clientfd = 0; /* client connection */
|
||||||
int currTimeout = 1;
|
int currTimeout = 1;
|
||||||
int len = sizeof(on);
|
int len = sizeof(on);
|
||||||
CYASSL* ssl = NULL; /* Initialize ssl object */
|
CYASSL* ssl = NULL; /* Initialize ssl object */
|
||||||
struct sockaddr_in servaddr; /* our server's address */
|
struct sockaddr_in servaddr; /* our server's address */
|
||||||
char buff[80]; /* string read from client */
|
char buff[80]; /* string read from client */
|
||||||
char ack[] = "I hear you fashizzle\n";
|
char ack[] = "I hear you fashizzle\n";
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,8 +215,8 @@ void NonBlockingSSL_Accept(CYASSL* ssl)
|
||||||
(error == SSL_ERROR_WANT_READ ||
|
(error == SSL_ERROR_WANT_READ ||
|
||||||
error == SSL_ERROR_WANT_WRITE))) {
|
error == SSL_ERROR_WANT_WRITE))) {
|
||||||
if (cleanup == 1) {
|
if (cleanup == 1) {
|
||||||
CyaSSL_free(ssl); //added
|
CyaSSL_free(ssl);
|
||||||
CyaSSL_shutdown(ssl); //added
|
CyaSSL_shutdown(ssl);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,8 +303,10 @@ int main(int argc, char** argv)
|
||||||
act.sa_flags = 0;
|
act.sa_flags = 0;
|
||||||
sigaction(SIGINT, &act, &oact);
|
sigaction(SIGINT, &act, &oact);
|
||||||
|
|
||||||
//CyaSSL_Debugging_ON();
|
/* CyaSSL_Debugging_ON(); */
|
||||||
CyaSSL_Init(); /* Initialize CyaSSL */
|
|
||||||
|
/* Initialize CyaSSL */
|
||||||
|
CyaSSL_Init();
|
||||||
|
|
||||||
/* Set ctx to DTLS 1.2 */
|
/* Set ctx to DTLS 1.2 */
|
||||||
if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) {
|
if ((ctx = CyaSSL_CTX_new(CyaDTLSv1_2_server_method())) == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue