![]() LoadCertificates(ctx, "mycert.pem", "mycert.pem") /* load certs */ Printf("This program must be run as root/sudo user!!") Ĭtx = InitServerCTX() /* initialize SSL */ Sd = SSL_get_fd(ssl) /* get socket connection */ SSL_write(ssl, reply, strlen(reply)) /* send reply */ Sprintf(reply, HTMLecho, buf) /* construct reply */ ShowCerts(ssl) /* get any certificates */īytes = SSL_read(ssl, buf, sizeof(buf)) /* get request */ If ( SSL_accept(ssl) = FAIL ) /* do SSL-protocol accept */ If ( SSL_CTX_use_certificate_file(ctx, CertFile, SSL_FILETYPE_PEM) %s\n\n" * set the local certificate from CertFile */ Void LoadCertificates(SSL_CTX* ctx, char* CertFile, char* KeyFile) Method = SSLv3_server_method() /* create new server-method instance */Ĭtx = SSL_CTX_new(method) /* create new context from method */ SSL_load_error_strings() /* load all error messages */ OpenSSL_add_all_algorithms() /* load
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |