Addes SSL Support
This commit is contained in:
@ -11,10 +11,14 @@
|
||||
#include <thread>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <bits/signum.h>
|
||||
#include <csignal>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns UNIX time in microseconds
|
||||
* @return UNIX time [µs]
|
||||
@ -48,6 +52,8 @@ string getMimeType(string path) {
|
||||
}
|
||||
}
|
||||
|
||||
magic_close(magic);
|
||||
|
||||
return type + "; charset=" + charset;
|
||||
}
|
||||
|
||||
@ -115,9 +121,17 @@ string getWebRoot(string host) {
|
||||
long clientnum = 0;
|
||||
|
||||
int main() {
|
||||
|
||||
SSL_load_error_strings();
|
||||
SSL_library_init();
|
||||
ERR_load_crypto_strings();
|
||||
OpenSSL_add_all_algorithms();
|
||||
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
cout << "Necronda Server 3.0" << endl << "by Lorenz Stechauner" << endl << endl;
|
||||
|
||||
unsigned short PORT = 8080;
|
||||
unsigned short PORT = 443;
|
||||
|
||||
Socket *s;
|
||||
try {
|
||||
|
Reference in New Issue
Block a user