aboutsummaryrefslogtreecommitdiff
path: root/cast/common/certificate/testing/test_helpers.h
blob: 3071597156089be8f45143d1ffb91872888db7b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CAST_COMMON_CERTIFICATE_TESTING_TEST_HELPERS_H_
#define CAST_COMMON_CERTIFICATE_TESTING_TEST_HELPERS_H_

#include <openssl/evp.h>

#include <string>
#include <vector>

#include "absl/strings/string_view.h"
#include "cast/common/certificate/cast_cert_validator_internal.h"
#include "cast/common/certificate/types.h"

namespace openscreen {
namespace cast {
namespace testing {

class SignatureTestData {
 public:
  SignatureTestData();
  ~SignatureTestData();

  ConstDataSpan message;
  ConstDataSpan sha1;
  ConstDataSpan sha256;
};

SignatureTestData ReadSignatureTestData(absl::string_view filename);

}  // namespace testing
}  // namespace cast
}  // namespace openscreen

#endif  // CAST_COMMON_CERTIFICATE_TESTING_TEST_HELPERS_H_