Cryptography providers are configured in the <CryptoProviders> tag section. Communication with cryptographic devices (cryptographic card or HSM cryptographic module) takes place using the PKCS#11 interface and the <HardwareProvider> tag is used. In the existing settings_cryptoproviders configuration, a hardware cryptography provider is defined by default to support CryptoTech Carbon, CryptoTech Graphite and CryptoTech CloudSigner cryptographic cards. Code Block |
---|
language | xml |
---|
linenumbers | true |
---|
| <CryptoProviders>
<!-- PKCS11 KIR Carbon -->
<HardwareProvider>
<Name>PKCS#11 Type A</Name>
<URI>CCP11s.dll</URI>
</HardwareProvider>
<!-- PKCS11 KIR Graphite -->
<HardwareProvider>
<Name>PKCS#11 Type A</Name>
<URI>CCGraphitep11.dll</URI>
</HardwareProvider>
<!-- PKCS11 KIR mSzafir -->
<HardwareProvider>
<Name>PKCS#11 Type A</Name>
<URI>file:///c:/Program%20Files/CryptoTech/CryptoCard/CloudSignerP1164.dll</URI>
</HardwareProvider>
<HardwareProvider>
<Name>PKCS#11 Type A</Name>
<URI>file:///c:/Program%20Files%20(x86)/CryptoTech/CryptoCard/CloudSignerP11.dll</URI>
</HardwareProvider>
</CryptoProviders> |
It is possible to use many different cryptography providers by specifying multiple <HardwareProvider> tags. The PKCS # 12 public key cryptography standard allows the use of .p12 or .pfx files that store the private key and certificates. This variant is defined using the <SoftwareProvider> tag. Code Block |
---|
language | xml |
---|
linenumbers | true |
---|
| <CryptoProviders>
<SoftwareProvider>
<Name>PKCS#12</Name>
<URI>file:///c:/example.p12</URI>
</SoftwareProvider>
</CryptoProviders> |
Cryptography provider URIs must contain URI-compliant entries. Currently, URIs pointing to local files (file:///) and network resources (http:// and https://) are supported for cryptography providers. It is possible to use relative URIs, but remember to put the libraries in the path shown under System.getProperty ("java.library.path") in the Java Virtual Machine. For the library in the PKCS#12 standard, an alternative form of specifying the URI path is to specify the entire file in Base64 encoded form. Code Block |
---|
language | xml |
---|
linenumbers | true |
---|
| <SoftwareProvider>
<Name>PKCS#12</Name>
<Base64Binary>JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRs</Base64Binary>
</SoftwareProvider> |
|