You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Get certificate information. TASK-019: the four string-typed
@@ -85,13 +85,13 @@ class secure_resource : public httpserver::http_resource {
85
85
86
86
// Check if certificate is verified by our CA
87
87
if (!verified) {
88
-
returnstd::make_shared<httpserver::http_response>(httpserver::http_response::string("Certificate not verified by trusted CA").with_status(httpserver::http::http_utils::http_forbidden));
88
+
returnhttpserver::http_response::string("Certificate not verified by trusted CA").with_status(httpserver::http::http_utils::http_forbidden);
returnstd::make_shared<httpserver::http_response>(httpserver::http_response::string("Certificate not in allowlist").with_status(httpserver::http::http_utils::http_forbidden));
94
+
returnhttpserver::http_response::string("Certificate not in allowlist").with_status(httpserver::http::http_utils::http_forbidden);
95
95
}
96
96
97
97
// Check certificate validity times. TASK-019 narrows the
@@ -101,11 +101,11 @@ class secure_resource : public httpserver::http_resource {
returnstd::make_shared<httpserver::http_response>(httpserver::http_response::string("Certificate not yet valid").with_status(httpserver::http::http_utils::http_forbidden));
104
+
returnhttpserver::http_response::string("Certificate not yet valid").with_status(httpserver::http::http_utils::http_forbidden);
105
105
}
106
106
107
107
if (now > not_after) {
108
-
returnstd::make_shared<httpserver::http_response>(httpserver::http_response::string("Certificate has expired").with_status(httpserver::http::http_utils::http_forbidden));
108
+
returnhttpserver::http_response::string("Certificate has expired").with_status(httpserver::http::http_utils::http_forbidden);
109
109
}
110
110
111
111
// Build response with certificate info
@@ -116,14 +116,14 @@ class secure_resource : public httpserver::http_resource {
0 commit comments