@@ -76,13 +76,14 @@ namespace ccf::pal::snp
7676 EndorsementsEndpointType type = Azure;
7777 std::optional<std::string> url = std::nullopt ;
7878 std::optional<size_t > max_retries_count = std::nullopt ;
79+ std::optional<ccf::ds::SizeString> max_client_response_size = std::nullopt ;
7980
8081 bool operator ==(const EndorsementsServer&) const = default ;
8182 };
8283 DECLARE_JSON_TYPE_WITH_OPTIONAL_FIELDS (EndorsementsServer);
8384 DECLARE_JSON_REQUIRED_FIELDS (EndorsementsServer);
8485 DECLARE_JSON_OPTIONAL_FIELDS (
85- EndorsementsServer, type, url, max_retries_count);
86+ EndorsementsServer, type, url, max_retries_count, max_client_response_size );
8687 using EndorsementsServers = std::vector<EndorsementsServer>;
8788
8889 struct HostPort
@@ -99,17 +100,20 @@ namespace ccf::pal::snp
99100 const HostPort& endpoint,
100101 const std::string& chip_id_hex,
101102 const std::string& reported_tcb,
102- size_t max_retries_count)
103+ size_t max_retries_count,
104+ size_t max_client_response_size)
103105 {
104106 std::map<std::string, std::string> params;
105107 params[" api-version" ] = " 2020-10-15-preview" ;
106108 EndorsementEndpointsConfiguration::EndpointInfo info{
107109 endpoint.host ,
108110 endpoint.port ,
109111 fmt::format (" /SevSnpVM/certificates/{}/{}" , chip_id_hex, reported_tcb),
110- params};
112+ params,
113+ };
111114
112115 info.max_retries_count = max_retries_count;
116+ info.max_client_response_size = max_client_response_size;
113117
114118 return {info};
115119 }
@@ -127,7 +131,8 @@ namespace ccf::pal::snp
127131 const std::string& snp,
128132 const std::string& microcode,
129133 const ProductName& product_name,
130- size_t max_retries_count)
134+ size_t max_retries_count,
135+ size_t max_client_response_size)
131136 {
132137 std::map<std::string, std::string> params;
133138 params[" blSPL" ] = boot_loader;
@@ -144,12 +149,14 @@ namespace ccf::pal::snp
144149 true // DER
145150 };
146151 leaf.max_retries_count = max_retries_count;
152+ leaf.max_client_response_size = max_client_response_size;
147153 EndorsementEndpointsConfiguration::EndpointInfo chain{
148154 endpoint.host ,
149155 endpoint.port ,
150156 fmt::format (" /vcek/v1/{}/cert_chain" , to_string (product_name)),
151157 {}};
152158 chain.max_retries_count = max_retries_count;
159+ chain.max_client_response_size = max_client_response_size;
153160
154161 server.push_back (leaf);
155162 server.push_back (chain);
@@ -164,7 +171,8 @@ namespace ccf::pal::snp
164171 const HostPort& endpoint,
165172 const std::string& chip_id_hex,
166173 const std::string& reported_tcb,
167- size_t max_retries_count)
174+ size_t max_retries_count,
175+ size_t max_client_response_size)
168176 {
169177 std::map<std::string, std::string> params;
170178 params[" tcbVersion" ] = reported_tcb;
@@ -180,6 +188,7 @@ namespace ccf::pal::snp
180188 false // No TLS
181189 };
182190 info.max_retries_count = max_retries_count;
191+ info.max_client_response_size = max_client_response_size;
183192
184193 return {info};
185194 }
0 commit comments