https://github.com/henrycg/earand
Raw File
Tip revision: 362625f3847ddd2e2d5a90cf5f93b4b3ea76e059 authored by Henry Corrigan-Gibbs on 21 May 2018, 19:54:59 UTC
Merge branch 'master' of github.com:henrycg/earand
Tip revision: 362625f
ssl_server.h
#ifndef _SSL_SERVER_H
#define _SSL_SERVER_H

#include <openssl/ssl.h>
#include "util.h"

#define FAIL    -1

/* This is the type of a server object */
typedef void (*ServerFunction)(SSL* ssl, void* data);

/**
 * Start an SSL server process using the certificate and
 * private key provided. The server_data pointer is passed
 * to each server instance started up.
 */
int StartSSLServer(const char* cert_file, const char* key_file, 
    int portnum, ServerFunction server_func,
    void* server_data);

/**
 * A ServerFunction that prints debugging info
 */
void DebugServer(SSL* ssl, void* data); 

#endif
back to top