From 7d93817e4909f401b067ae4bc458b465de50c1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Tue, 22 Feb 2022 20:58:14 +0100 Subject: [PATCH] Add PKCS8 error --- include/libgourou_common.h | 1 + utils/drmprocessorclientimpl.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/libgourou_common.h b/include/libgourou_common.h index 72865df..dbfedf6 100644 --- a/include/libgourou_common.h +++ b/include/libgourou_common.h @@ -110,6 +110,7 @@ namespace gourou CLIENT_ZIP_ERROR, CLIENT_GENERIC_EXCEPTION, CLIENT_NETWORK_ERROR, + CLIENT_INVALID_PKCS8, }; enum DRM_REMOVAL_ERROR { diff --git a/utils/drmprocessorclientimpl.cpp b/utils/drmprocessorclientimpl.cpp index 701f8b5..c412484 100644 --- a/utils/drmprocessorclientimpl.cpp +++ b/utils/drmprocessorclientimpl.cpp @@ -184,7 +184,7 @@ void DRMProcessorClientImpl::RSAPrivateDecrypt(const unsigned char* RSAKey, unsi PKCS8_PRIV_KEY_INFO* p8inf = d2i_PKCS8_PRIV_KEY_INFO_bio(mem, NULL); if (!p8inf) - EXCEPTION(gourou::CLIENT_INVALID_PKCS12, ERR_error_string(ERR_get_error(), NULL)); + EXCEPTION(gourou::CLIENT_INVALID_PKCS8, ERR_error_string(ERR_get_error(), NULL)); EVP_PKEY* pkey = EVP_PKCS82PKEY(p8inf); RSA * rsa;