return 0;
}
-int check_permissions(struct MHD_Connection *connection, int *code) {
+int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) {
const union MHD_ConnectionInfo *ci;
gnutls_session_t session;
gnutls_x509_crt_t client_cert;
log_info("Connection from %s", buf);
+ if (hostname) {
+ *hostname = buf;
+ buf = NULL;
+ }
+
r = verify_cert_authorized(session);
if (r < 0) {
log_warning("Client is not authorized");
}
#else
-int check_permissions(struct MHD_Connection *connection, int *code) {
+int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) {
return -EPERM;
}
#endif