- Timestamp:
- Sep 14, 2024, 9:51:41 AM (2 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/config.c
r18 r19 35 35 config.vhosts[i].sslkey = NULL; 36 36 config.vhosts[i].sslcert = NULL; 37 config.vhosts[i].root = NULL; 37 38 } 38 39 config.root.sslkey = NULL; 39 40 config.root.sslcert = NULL; 41 config.root.root = NULL; 40 42 config.vhost_count = 0; 41 43 config.module_count = 0; … … 130 132 current->sslcert = cm_strdup(r[1]); 131 133 } 134 } else if(cm_strcaseequ(r[0], "DocumentRoot")) { 135 if(r[1] == NULL) { 136 cm_log("Config", "Missing path at line %d", ln); 137 stop = 1; 138 } else { 139 if(current->root != NULL) free(current->root); 140 current->root = cm_strdup(r[1]); 141 } 132 142 } else if(cm_strcaseequ(r[0], "ServerRoot")) { 133 143 if(r[1] == NULL) { -
trunk/Server/server.c
r18 r19 216 216 tw_write(ssl, sock, (unsigned char*)doc + incr, size < 128 ? size : 128); 217 217 incr += 128; 218 if(size <= 128) break; 218 219 size -= 128; 219 if(size <= 0) break;220 220 } 221 221 } -
trunk/Server/ssl.c
r16 r19 26 26 SSL_use_certificate_file(ssl, e->sslcert, SSL_FILETYPE_PEM); 27 27 return 1; 28 } else if(config.root.sslkey != NULL && config.root.sslcert != NULL) { 29 SSL_use_PrivateKey_file(ssl, config.root.sslkey, SSL_FILETYPE_PEM); 30 SSL_use_certificate_file(ssl, config.root.sslcert, SSL_FILETYPE_PEM); 28 31 } else { 29 32 return 0; -
trunk/Server/tw_config.h
r18 r19 15 15 char* sslkey; 16 16 char* sslcert; 17 char* root; 17 18 }; 18 19 -
trunk/example.conf
r17 r19 10 10 SSLCertificate cert.pem 11 11 12 DocumentRoot /var/www 13 12 14 BeginVirtualHost nishinbsd-ssd 13 15 EndVirtualHost
Note:
See TracChangeset
for help on using the changeset viewer.