CCF
Loading...
Searching...
No Matches
node_frontend_utils.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include "ccf/http_status.h"
6#include "ccf/node/quote.h"
7
8namespace ccf
9{
10 static std::pair<http_status, std::string> quote_verification_error(
12 {
13 switch (result)
14 {
16 return std::make_pair(
17 HTTP_STATUS_UNAUTHORIZED, "Quote could not be verified");
19 return std::make_pair(
20 HTTP_STATUS_UNAUTHORIZED,
21 "Quote does not contain known enclave measurement");
23 return std::make_pair(
24 HTTP_STATUS_UNAUTHORIZED,
25 "Quote report data does not match the hash of the public key for "
26 "this node");
28 return std::make_pair(
29 HTTP_STATUS_UNAUTHORIZED, "Quote does not contain trusted host data");
31 return std::make_pair(
32 HTTP_STATUS_UNAUTHORIZED, "Quote host data is not authorised");
34 return std::make_pair(
35 HTTP_STATUS_UNAUTHORIZED, "UVM endorsements are not authorised");
36 default:
37 return std::make_pair(
38 HTTP_STATUS_INTERNAL_SERVER_ERROR,
39 "Unknown quote verification error");
40 }
41 }
42}
Definition app_interface.h:14
QuoteVerificationResult
Definition quote.h:18