|
9 | 9 | #include <fizz/protocol/ech/Encryption.h>
|
10 | 10 | #include "fizz/record/Types.h"
|
11 | 11 |
|
12 |
| -#include <fizz/backend/openssl/OpenSSL.h> |
13 | 12 | #include <fizz/crypto/hpke/Utils.h>
|
14 | 13 | #include <fizz/protocol/Protocol.h>
|
15 | 14 | #include <fizz/protocol/ech/ECHExtensions.h>
|
@@ -208,36 +207,6 @@ static hpke::SetupParam getSetupParam(
|
208 | 207 | 0};
|
209 | 208 | }
|
210 | 209 |
|
211 |
| -std::unique_ptr<folly::IOBuf> getRecordDigest( |
212 |
| - const ECHConfig& echConfig, |
213 |
| - hpke::KDFId id) { |
214 |
| - switch (id) { |
215 |
| - case hpke::KDFId::Sha256: { |
216 |
| - std::array<uint8_t, fizz::Sha256::HashLen> recordDigest; |
217 |
| - fizz::openssl::Hasher<Sha256>::hash( |
218 |
| - *encode(echConfig), |
219 |
| - folly::MutableByteRange(recordDigest.data(), recordDigest.size())); |
220 |
| - return folly::IOBuf::copyBuffer(recordDigest); |
221 |
| - } |
222 |
| - case hpke::KDFId::Sha384: { |
223 |
| - std::array<uint8_t, fizz::Sha384::HashLen> recordDigest; |
224 |
| - fizz::openssl::Hasher<Sha384>::hash( |
225 |
| - *encode(echConfig), |
226 |
| - folly::MutableByteRange(recordDigest.data(), recordDigest.size())); |
227 |
| - return folly::IOBuf::copyBuffer(recordDigest); |
228 |
| - } |
229 |
| - case hpke::KDFId::Sha512: { |
230 |
| - std::array<uint8_t, fizz::Sha512::HashLen> recordDigest; |
231 |
| - fizz::openssl::Hasher<Sha512>::hash( |
232 |
| - *encode(echConfig), |
233 |
| - folly::MutableByteRange(recordDigest.data(), recordDigest.size())); |
234 |
| - return folly::IOBuf::copyBuffer(recordDigest); |
235 |
| - } |
236 |
| - default: |
237 |
| - throw std::runtime_error("kdf: not implemented"); |
238 |
| - } |
239 |
| -} |
240 |
| - |
241 | 210 | hpke::SetupResult constructHpkeSetupResult(
|
242 | 211 | std::unique_ptr<KeyExchange> kex,
|
243 | 212 | const SupportedECHConfig& supportedConfig) {
|
|
0 commit comments