Files
whitebox/whitebox/reference/impl/private_keys.h
Aaron Vaage f936dd2983 Add "License Key Mode" To API
In order to support both single-key and dual-key RSA implementations
where single-key will use key 0 for both sign and encryption and where
dual-key will use key 0 for sign and key 1 for encryption.

Additional changes in this code drop:

 - Added VMP / RA override enabled tests
 - Added VMP / RA override disabled tests

This brings the partner repo in sync with the internal repo at
commit 71760b6da1ec546c65b56e2f86b39b73b53f6734.
2021-04-05 12:05:15 -07:00

29 lines
1.0 KiB
C++

// Copyright 2021 Google LLC. All Rights Reserved.
// These functions are used as an abstraction layer between
// "api/test_license_private_keys.h" and the reference white-box implementation
// so that integrators can more easily replace the private keys used by the
// reference white-box when used in their code base (e.g. creating a debug
// build).
//
// When using the reference implementation with different keys than the ones
// defined in the "//api", replace the implementation of these functions
// instead of the replacing the implementation of the functions in "//api".
#ifndef WHITEBOX_REFERENCE_IMPL_PRIVATE_KEYS_H_
#define WHITEBOX_REFERENCE_IMPL_PRIVATE_KEYS_H_
#include <cstdint>
#include <vector>
namespace widevine {
// Returns the private encryption key as a DER encoded PKCS#1 key.
std::vector<uint8_t> GetEncryptionPrivateKey();
// Returns the private signing key as a DER encoded PKCS#1 key.
std::vector<uint8_t> GetSigningPrivateKey();
} // namespace widevine
#endif // WHITEBOX_REFERENCE_IMPL_PRIVATE_KEYS_H_