33 lines
1.2 KiB
C++
33 lines
1.2 KiB
C++
////////////////////////////////////////////////////////////////////////////////
|
|
// Copyright 2013 Google LLC.
|
|
//
|
|
// This software is licensed under the terms defined in the Widevine Master
|
|
// License Agreement. For a copy of this agreement, please contact
|
|
// widevine-licensing@google.com.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Description:
|
|
// Auxiliary functions for license server SDK testing.
|
|
|
|
#ifndef COMMON_TEST_UTILS_H_
|
|
#define COMMON_TEST_UTILS_H_
|
|
|
|
#include <string>
|
|
|
|
#include "common/status.h"
|
|
|
|
namespace widevine {
|
|
|
|
// Generate RSA signature using the specified RSA private key, SHA256 digest,
|
|
// and PKCS#1 1.5 padding. |pem_private_key| is a PEM-encoded private RSA key,
|
|
// |message| is the message to be signed, and |signature| is a pointer to a
|
|
// std::string where the signature will be stored. The caller returns ownership of
|
|
// all paramters.
|
|
util::Status GenerateRsaSignatureSha256Pkcs1(const std::string& pem_private_key,
|
|
const std::string& message,
|
|
std::string* signature);
|
|
|
|
} // namespace widevine
|
|
|
|
#endif // COMMON_TEST_UTILS_H_
|