APIdia Launch Partner
Top Description Fields Constructors Methods
javax.crypto

pack-priv final Class ProviderVerifier

extends Object
Class Inheritance
Imports
java.io.*, java.net.*, java.security.*, java.util.jar.*

This class verifies Provider/Policy resources found at a URL (currently only JAR files and any supporting JAR files), and determines whether they may be used in this implementation. The JCE in OpenJDK has an open cryptographic interface, meaning it does not restrict which providers can be used. Compliance with United States export controls and with local law governing the import/export of products incorporating the JCE in the OpenJDK is the responsibility of the licensee.
Since
1.7

Field Summary

Modifier and TypeField and Description
private CryptoPermissions
private final URL
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
ProviderVerifier(URL
the JAR file to be verified.
jarURL
,
boolean
if true, save the permissions allowed by the exemption mechanism
savePerms
)

Creates a ProviderVerifier object to verify the given URL.

pack-priv
ProviderVerifier(URL
the JAR file to be verified
jarURL
,
Provider
the corresponding provider.
provider
,
boolean
if true, save the permissions allowed by the exemption mechanism
savePerms
)

Creates a ProviderVerifier object to verify the given URL.

Method Summary

Modifier and TypeMethod and Description
pack-priv CryptoPermissions
getPermissions()

Returns the permissions which are bundled with the JAR file, aka the "cryptoperms" file.

pack-priv static boolean
isTrustedCryptoProvider(Provider provider)

Returns true if the given provider is JDK trusted crypto provider if the implementation supports fast-path verification.

pack-priv void
verify()

Verify the JAR file is signed by an entity which has a certificate issued by a trusted CA. In OpenJDK, we just need to examine the "cryptoperms" file to see if any permissions were bundled together with this jar file.

pack-priv static void
verifyPolicySigned(Certificate[]
the list of certs to be checked.
certs
)

Verify that the provided certs include the framework signing certificate.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

appPermsback to summary
private CryptoPermissions appPerms
jarURLback to summary
private final URL jarURL
savePermsback to summary
private final boolean savePerms

Constructor Detail

ProviderVerifierback to summary
pack-priv ProviderVerifier(URL jarURL, boolean savePerms)

Creates a ProviderVerifier object to verify the given URL.

Parameters
jarURL:URL

the JAR file to be verified.

savePerms:boolean

if true, save the permissions allowed by the exemption mechanism

ProviderVerifierback to summary
pack-priv ProviderVerifier(URL jarURL, Provider provider, boolean savePerms)

Creates a ProviderVerifier object to verify the given URL.

Parameters
jarURL:URL

the JAR file to be verified

provider:Provider

the corresponding provider.

savePerms:boolean

if true, save the permissions allowed by the exemption mechanism

Method Detail

getPermissionsback to summary
pack-priv CryptoPermissions getPermissions()

Returns the permissions which are bundled with the JAR file, aka the "cryptoperms" file.

Note

if this ProviderVerifier instance is constructed with "savePerms" equal to false, then this method would always return null.

isTrustedCryptoProviderback to summary
pack-priv static boolean isTrustedCryptoProvider(Provider provider)

Returns true if the given provider is JDK trusted crypto provider if the implementation supports fast-path verification.

verifyback to summary
pack-priv void verify() throws IOException

Verify the JAR file is signed by an entity which has a certificate issued by a trusted CA. In OpenJDK, we just need to examine the "cryptoperms" file to see if any permissions were bundled together with this jar file.

verifyPolicySignedback to summary
pack-priv static void verifyPolicySigned(Certificate[] certs) throws Exception

Verify that the provided certs include the framework signing certificate.

Parameters
certs:Certificate[]

the list of certs to be checked.

Exceptions
Exception:
if the list of certs did not contain the framework signing certificate