diff --git a/common/drm_root_certificate.h b/common/drm_root_certificate.h deleted file mode 100644 index e786351..0000000 --- a/common/drm_root_certificate.h +++ /dev/null @@ -1,106 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// 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: -// Root device certificate holder class which deserializes, validates, -// and extracts the root certificate public key. - -#ifndef COMMON_DRM_ROOT_CERTIFICATE_H_ -#define COMMON_DRM_ROOT_CERTIFICATE_H_ - -// common_typos_disable. Successful / successfull. - -#include -#include - -#include "base/macros.h" -#include "common/status.h" - -#include "common/certificate_type.h" - -namespace widevine { - -class DrmCertificate; -class RsaKeyFactory; -class RsaPublicKey; -class SignedDrmCertificate; -class VerifiedCertSignatureCache; - -// Root certificate and certificate chain verifier with internal caching. -// This object is thread-safe. -class DrmRootCertificate { - public: - virtual ~DrmRootCertificate(); - - // Creates a DrmRootCertificate object given a certificate type. - // |cert| may not be nullptr, and it points to a - // std::unique_ptr which will be used to return a newly - // created const DrmRootCertificate* if successful. The caller assumes - // ownership of the new DrmRootCertificate. This method returns - // Status::OK on success, or appropriate error status otherwise. - static Status CreateByType(CertificateType cert_type, - std::unique_ptr* cert); - - // Variant on the method above to make CLIF happy until b/110539622 is fixed. - static std::unique_ptr CreateByType( - CertificateType cert_type, Status* status); - - // Creates a DrmRootCertificate object given a certificate type std::string, which - // must be one of "prod", "qa", or "test". - // |cert| may not be nullptr, and it points to a - // std::unique_ptr which will be used to return a newly - // created const DrmRootCertificate* if successful. The caller assumes - // ownership of the new DrmRootCertificate. This method returns - // Status::OK on success, or appropriate error status otherwise. - static Status CreateByTypeString(const std::string& cert_type_string, - std::unique_ptr* cert); - - // |certificate| will contgain the DRM certificate upon successful return. - // May be null. - // Returns Status::OK if successful, or an appropriate error code otherwise. - virtual Status VerifyCertificate(const std::string& serialized_certificate, - SignedDrmCertificate* signed_certificate, - DrmCertificate* certificate) const; - - // Returns the hex-encoded SHA-256 digest for this certificate. - virtual std::string GetDigest() const; - - const CertificateType type() const { return type_; } - - const std::string& public_key() const { return public_key_; } - - protected: - DrmRootCertificate(CertificateType cert_type, - const std::string& serialized_certificate, - const std::string& serial_number, const std::string& public_key, - std::unique_ptr key_factory); - - private: - friend class DrmRootCertificateTest; - - static Status Create(CertificateType cert_type, - std::unique_ptr key_factory, - std::unique_ptr* cert); - - Status VerifySignatures(const SignedDrmCertificate& signed_cert, - const std::string& cert_serial_number, - bool use_cache) const; - - CertificateType type_; - std::string serialized_certificate_; - std::string serial_number_; - std::string public_key_; - std::unique_ptr key_factory_; - mutable std::unique_ptr signature_cache_; - - DISALLOW_IMPLICIT_CONSTRUCTORS(DrmRootCertificate); -}; - -} // namespace widevine - -#endif // COMMON_DRM_ROOT_CERTIFICATE_H_ diff --git a/example/wvpl_cas_proxy_environment_example b/example/wvpl_cas_proxy_environment_example index b56f908..eae3401 100644 Binary files a/example/wvpl_cas_proxy_environment_example and b/example/wvpl_cas_proxy_environment_example differ diff --git a/example/wvpl_cas_proxy_session_example b/example/wvpl_cas_proxy_session_example index 116758d..6985990 100644 Binary files a/example/wvpl_cas_proxy_session_example and b/example/wvpl_cas_proxy_session_example differ diff --git a/libwvpl_cas_proxy.so b/libwvpl_cas_proxy.so index d162f23..ae674b2 100755 Binary files a/libwvpl_cas_proxy.so and b/libwvpl_cas_proxy.so differ diff --git a/sdk/external/common/wvpl/wvpl_sdk_environment.h b/sdk/external/common/wvpl/wvpl_sdk_environment.h index 6b74b86..dc0b9cc 100644 --- a/sdk/external/common/wvpl/wvpl_sdk_environment.h +++ b/sdk/external/common/wvpl/wvpl_sdk_environment.h @@ -12,11 +12,13 @@ #include #include -#include "common/drm_root_certificate.h" #include "sdk/external/common/wvpl/wvpl_types.h" -#include "protos/public/device_certificate_status.pb.h" -#include "protos/public/provisioned_device_info.pb.h" +namespace widevine { +class DeviceCertificateStatusList; +class DrmRootCertificate; +class ProvisionedDeviceInfo; +} // namespace widevine namespace widevine_server { namespace wv_pl_sdk { @@ -38,8 +40,7 @@ const char kDrmCertificateType[] = "drm_certificate_type"; */ class WvPLSDKEnvironment { public: - virtual ~WvPLSDKEnvironment() {} - static void SetConfigValue(const std::map& config_values); + virtual ~WvPLSDKEnvironment(); // Generates a license response containing a message generated in response to // an error condition. |create_session_status| is a previous error status // returned by the CreateSession(). |license_response| points to a std::string to @@ -87,6 +88,8 @@ class WvPLSDKEnvironment { WvPLStatus SetDeviceCertificateStatusList(const std::string& cert_list) const; + static void SetConfigValue(const std::map& config_values); + // Number of seconds until the certificate status list expires after its // creation time. Default value is 604800 seconds. uint32_t device_certificate_expiration_seconds_ = 604800;