#include <stdio.h>
#include <signal.h>
-#include "err.h"
-#include "ssl.h"
+#include <openssl/err.h>
+#include <openssl/ssl.h>
#define CERT_FILE "server.pem"
BIO_free(in);
}
-int main(argc,argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
char *port=NULL;
BIO *ssl_bio,*tmp;
SSL_CTX *ctx;
- SSL *ssl;
char buf[512];
int ret=1,i;
SSL_load_error_strings();
/* Add ciphers and message digests */
- SSLeay_add_ssl_algorithms();
+ OpenSSL_add_ssl_algorithms();
ctx=SSL_CTX_new(SSLv23_server_method());
if (!SSL_CTX_use_certificate_file(ctx,CERT_FILE,SSL_FILETYPE_PEM))
goto err;
/* Setup server side SSL bio */
- ssl=SSL_new(ctx);
ssl_bio=BIO_new_ssl(ctx,0);
if ((in=BIO_new_accept(port)) == NULL) goto err;
again:
/* The first call will setup the accept socket, and the second
- * will get a socket. In this loop, the first actuall accept
+ * will get a socket. In this loop, the first actual accept
* will occur in the BIO_read() function. */
if (BIO_do_accept(in) <= 0) goto err;