LibreOffice Module xmlsecurity (master) 1
Macros | Functions | Variables
securityenvironment_mscryptimpl.cxx File Reference
#include <sal/config.h>
#include <cstddef>
#include <string.h>
#include <Windows.h>
#include <WinCrypt.h>
#include <sal/macros.h>
#include <osl/thread.h>
#include "securityenvironment_mscryptimpl.hxx"
#include "x509certificate_mscryptimpl.hxx"
#include <comphelper/servicehelper.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <xmlsec-wrapper.h>
#include "akmngr.hxx"
#include <biginteger.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/windowserrorstring.hxx>
#include <sal/log.hxx>
#include <rtl/locale.h>
#include <rtl/ref.hxx>
#include <osl/nlsupport.h>
#include <osl/process.h>
#include <o3tl/char16_t2wchar_t.hxx>
#include <svl/cryptosign.hxx>
Include dependency graph for securityenvironment_mscryptimpl.cxx:

Go to the source code of this file.

Macros

#define WIN32_LEAN_AND_MEAN
 

Functions

static rtl::Reference< X509Certificate_MSCryptImplMswcryCertContextToXCert (PCCERT_CONTEXT cert)
 
static void traceTrustStatus (DWORD err)
 
static HCERTSTORE getCertStoreForIntermediatCerts (const uno::Sequence< uno::Reference< css::security::XCertificate > > &seqCerts)
 
static bool CheckUnitTestStore (PCCERT_CHAIN_CONTEXT const pChainContext, DWORD ignoreFlags)
 
SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_xml_crypto_SecurityEnvironment_get_implementation (uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
 

Variables

CertErrorToString const arErrStrings []
 

Macro Definition Documentation

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 26 of file securityenvironment_mscryptimpl.cxx.

Function Documentation

◆ CheckUnitTestStore()

static bool CheckUnitTestStore ( PCCERT_CHAIN_CONTEXT const  pChainContext,
DWORD  ignoreFlags 
)
static

◆ com_sun_star_xml_crypto_SecurityEnvironment_get_implementation()

SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_xml_crypto_SecurityEnvironment_get_implementation ( uno::XComponentContext *  pCtx,
uno::Sequence< uno::Any > const &   
)

Definition at line 1104 of file securityenvironment_mscryptimpl.cxx.

◆ getCertStoreForIntermediatCerts()

static HCERTSTORE getCertStoreForIntermediatCerts ( const uno::Sequence< uno::Reference< css::security::XCertificate > > &  seqCerts)
static

Definition at line 717 of file securityenvironment_mscryptimpl.cxx.

References i, and SAL_INFO.

Referenced by SecurityEnvironment_MSCryptImpl::verifyCertificate().

◆ MswcryCertContextToXCert()

static rtl::Reference< X509Certificate_MSCryptImpl > MswcryCertContextToXCert ( PCCERT_CONTEXT  cert)
static

◆ traceTrustStatus()

static void traceTrustStatus ( DWORD  err)
static

Variable Documentation

◆ arErrStrings

CertErrorToString const arErrStrings[]
Initial value:
=
{
{ 0x00000000, "CERT_TRUST_NO_ERROR"},
{ 0x00000001, "CERT_TRUST_IS_NOT_TIME_VALID"},
{ 0x00000002, "CERT_TRUST_IS_NOT_TIME_NESTED"},
{ 0x00000004, "CERT_TRUST_IS_REVOKED" },
{ 0x00000008, "CERT_TRUST_IS_NOT_SIGNATURE_VALID" },
{ 0x00000010, "CERT_TRUST_IS_NOT_SIGNATURE_VALID"},
{ 0x00000020, "CERT_TRUST_IS_UNTRUSTED_ROOT"},
{ 0x00000040, "CERT_TRUST_REVOCATION_STATUS_UNKNOWN"},
{ 0x00000080, "CERT_TRUST_IS_CYCLIC"},
{ 0x00000100, "CERT_TRUST_INVALID_EXTENSION"},
{ 0x00000200, "CERT_TRUST_INVALID_POLICY_CONSTRAINTS"},
{ 0x00000400, "CERT_TRUST_INVALID_BASIC_CONSTRAINTS"},
{ 0x00000800, "CERT_TRUST_INVALID_NAME_CONSTRAINTS"},
{ 0x00001000, "CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT"},
{ 0x00002000, "CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT"},
{ 0x00004000, "CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT"},
{ 0x00008000, "CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT"},
{ 0x01000000, "CERT_TRUST_IS_OFFLINE_REVOCATION"},
{ 0x02000000, "CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY"},
{ 0x04000000, "CERT_TRUST_IS_EXPLICIT_DISTRUST"},
{ 0x08000000, "CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT"},
{ 0x00010000, "CERT_TRUST_IS_PARTIAL_CHAIN"},
{ 0x00020000, "CERT_TRUST_CTL_IS_NOT_TIME_VALID"},
{ 0x00040000, "CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID"},
{ 0x00080000, "CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE"}
}

Definition at line 71 of file securityenvironment_mscryptimpl.cxx.

Referenced by traceTrustStatus().