Bouncy Castle Cryptography Library 1.87

org.bouncycastle.util
Class Properties

java.lang.Object
  extended byorg.bouncycastle.util.Properties

public class Properties
extends java.lang.Object

Utility method for accessing system properties.


Field Summary
static java.lang.String ASN1_ALLOW_NON_DER_TIME
           
static java.lang.String ASN1_ALLOW_ZONELESS_UTCTIME
           
static java.lang.String ASN1_MAX_CONS_DEPTH
           
static java.lang.String ASN1_MAX_LIMIT
           
static java.lang.String BCFKS_MAX_IT_COUNT
           
static java.lang.String BCFKS_MAX_SCRYPT_MEMORY
           
static java.lang.String BCFKS_SCRYPT_P_EQ_R
           
static java.lang.String BCFKS_STORE_IT_COUNT
           
static java.lang.String BKS_ENABLE_V1
           
static java.lang.String BKS_MAX_IT_COUNT
           
static java.lang.String CMS_ALLOW_LEGACY_KEYAGREE_KDF
          Whether a CMS key agreement recipient, having failed to unwrap the content-encryption key with the RFC 5753 derivation, may retry with the raw user keying material as the KDF's SharedInfo.
static java.lang.String CMS_ALLOW_UNAUTHENTICATED_CBC_MAC_IV
          Whether a CMS AuthenticatedData message without authenticated attributes may carry a non-zero initialisation vector for a CBC-MAC (des-ede3-cbc or rc2-cbc as its macAlgorithm).
static java.lang.String CMS_MAX_DIGEST_ALGORITHMS
          The largest number of distinct digest algorithms BC will compute over the content of one SignedData message: the content digests CMSSignedData computes while its signers are verified (one per digest algorithm, shared by the signers using it) and the digest calculators CMSSignedDataParser runs over the content for the message's digestAlgorithms field.
static java.lang.String CONSTRAINTS_ALLOW_OVERRIDE
          Whether a constraint installed from a property at start-up may be replaced.
static java.lang.String CONSTRAINTS_QUANTUM_VULNERABLE
          The default crypto services constraint: "nist", "log", "legacy", "reject" or "none" (the default).
static java.lang.String DH_ALLOW_SHORT_PRIVATE_VALUE
           
static java.lang.String DH_MAX_SIZE
           
static java.lang.String DRBG_EFFECTIVE_256BITS_ENTROPY
           
static java.lang.String DRBG_ENTROPY_SOURCE
           
static java.lang.String DRBG_ENTROPY_THREAD
           
static java.lang.String DRBG_GATHER_PAUSE_SECS
           
static java.lang.String DSA_MAX_SIZE
           
static java.lang.String EC_MAX_F2M_FIELD_SIZE
          Upper bound on the field size m accepted when building a characteristic-2 (F2m) elliptic curve; an unbounded m from explicit EC parameters is an import-time CPU-exhaustion vector (CVE-2024-29857).
static java.lang.String EMULATE_ORACLE
          If set the provider will attempt, where possible, to behave the same way as the oracle one.
static java.lang.String GCM_ALLOW_SHORT_TAGS
           
static java.lang.String JSSE_CLIENT_ENABLE_DELEGATED_TASKS
           
static java.lang.String JSSE_HOSTNAME_CHECK_CN_FALLBACK
           
static java.lang.String JSSE_SERVER_ENABLE_DELEGATED_TASKS
           
static java.lang.String JSSE_USE_NAMED_GROUPS_ORDER
           
static java.lang.String MIME_MAX_DEPTH
           
static java.lang.String OCSP_MAX_RESPONSE_AGE
           
static java.lang.String OCSP_MAX_RESPONSE_SIZE
           
static java.lang.String OPENPGP_CSF_BARE_CR_LINE_ENDING
           
static java.lang.String OPENPGP_MAX_ARMOR_HEADER_LENGTH
           
static java.lang.String OPENPGP_MAX_ARMOR_HEADERS
           
static java.lang.String OPENPGP_STRICT_PARTIAL_BODY_LENGTH
           
static java.lang.String OPENPGP_TEXT_SIG_ALLOW_LEGACY_CR
           
static java.lang.String OPENSSH_MAX_ROUNDS
           
static java.lang.String PBE_MAX_ITERATION_COUNT
           
static java.lang.String PBE_MAX_SCRYPT_MEMORY
           
static java.lang.String PBKDF2_LEGACY_CIPHER_PRF
           
static java.lang.String PKCS1_STRICT_DIGESTINFO
           
static java.lang.String PKCS12_ALLOW_SUN_SECRET_KEYS
           
static java.lang.String PKCS12_IGNORE_USELESS_PASSWD
           
static java.lang.String PKCS12_MAX_IT_COUNT
           
static java.lang.String PKCS12_PBKDF2_IT_COUNT
           
static java.lang.String PKCS12_STORE_IT_COUNT
           
static java.lang.String PKMAC_MAX_ITERATION_COUNT
           
static java.lang.String SM9_ALLOW_MULTI_USE
          Whether one SM9 encryption user key may serve both the SM9 KEM and SM9 public-key decryption within the copy of the library in use.
static java.lang.String TSP_ALLOW_INCONSISTENT_SIGNING_TIME
          Whether a time-stamp token whose signing-time signed attribute disagrees with the genTime of its TSTInfo is accepted.
static java.lang.String TSP_ALLOWED_IMPRINT_ALGORITHMS
          The hash algorithms (comma separated digest names or OIDs) accepted for a time-stamp token's message imprint.
static java.lang.String X509_ALLOW_EMPTY_ISSUER_CERT
           
static java.lang.String X509_ALLOW_LENIENT_RFC822_NAME
           
static java.lang.String X509_CRL_CACHE_TTL
           
static java.lang.String X509_CRLDP_PROTOCOLS
           
static java.lang.String X509_ENABLE_CRLDP
           
static java.lang.String X509_MAX_CERT_PATH_BUILD_NODES
           
static java.lang.String X509_MAX_POLICY_NODES
           
static java.lang.String X509_SGP22_NAME_CONSTRAINTS
          Opt in to the relaxed directoryName name-constraint matching required by GSMA SGP.22 v2.5 (Remote SIM Provisioning).
 
Method Summary
static java.math.BigInteger asBigInteger(java.lang.String propertyName)
           
static int asInteger(java.lang.String propertyName, int defaultValue)
           
static java.util.Set asKeySet(java.lang.String propertyName)
           
static java.lang.String getPropertyValue(java.lang.String propertyName)
           
static java.lang.String getPropertyValue(java.lang.String propertyName, java.lang.String defValue)
           
static boolean isOverrideSet(java.lang.String propertyName)
          Return whether a particular override has been set to true.
static boolean isOverrideSet(java.lang.String propertyName, boolean defIsTrue)
          Return whether a particular override has been set to true.
static boolean isOverrideSetTo(java.lang.String propertyName, boolean isTrue)
          Return whether a particular override has been set to false.
static boolean removeThreadOverride(java.lang.String propertyName)
          Remove any value for the specified override property for the current thread only.
static boolean setThreadOverride(java.lang.String propertyName, boolean enable)
          Enable the specified override property for the current thread only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMULATE_ORACLE

public static final java.lang.String EMULATE_ORACLE
If set the provider will attempt, where possible, to behave the same way as the oracle one.

See Also:
Constant Field Values

PKCS12_IGNORE_USELESS_PASSWD

public static final java.lang.String PKCS12_IGNORE_USELESS_PASSWD
See Also:
Constant Field Values

PKCS12_MAX_IT_COUNT

public static final java.lang.String PKCS12_MAX_IT_COUNT
See Also:
Constant Field Values

PKCS12_STORE_IT_COUNT

public static final java.lang.String PKCS12_STORE_IT_COUNT
See Also:
Constant Field Values

PKCS12_PBKDF2_IT_COUNT

public static final java.lang.String PKCS12_PBKDF2_IT_COUNT
See Also:
Constant Field Values

BKS_MAX_IT_COUNT

public static final java.lang.String BKS_MAX_IT_COUNT
See Also:
Constant Field Values

OPENSSH_MAX_ROUNDS

public static final java.lang.String OPENSSH_MAX_ROUNDS
See Also:
Constant Field Values

X509_CRL_CACHE_TTL

public static final java.lang.String X509_CRL_CACHE_TTL
See Also:
Constant Field Values

X509_ENABLE_CRLDP

public static final java.lang.String X509_ENABLE_CRLDP
See Also:
Constant Field Values

X509_CRLDP_PROTOCOLS

public static final java.lang.String X509_CRLDP_PROTOCOLS
See Also:
Constant Field Values

OCSP_MAX_RESPONSE_SIZE

public static final java.lang.String OCSP_MAX_RESPONSE_SIZE
See Also:
Constant Field Values

OCSP_MAX_RESPONSE_AGE

public static final java.lang.String OCSP_MAX_RESPONSE_AGE
See Also:
Constant Field Values

OPENPGP_MAX_ARMOR_HEADER_LENGTH

public static final java.lang.String OPENPGP_MAX_ARMOR_HEADER_LENGTH
See Also:
Constant Field Values

OPENPGP_MAX_ARMOR_HEADERS

public static final java.lang.String OPENPGP_MAX_ARMOR_HEADERS
See Also:
Constant Field Values

OPENPGP_STRICT_PARTIAL_BODY_LENGTH

public static final java.lang.String OPENPGP_STRICT_PARTIAL_BODY_LENGTH
See Also:
Constant Field Values

OPENPGP_TEXT_SIG_ALLOW_LEGACY_CR

public static final java.lang.String OPENPGP_TEXT_SIG_ALLOW_LEGACY_CR
See Also:
Constant Field Values

OPENPGP_CSF_BARE_CR_LINE_ENDING

public static final java.lang.String OPENPGP_CSF_BARE_CR_LINE_ENDING
See Also:
Constant Field Values

PKCS12_ALLOW_SUN_SECRET_KEYS

public static final java.lang.String PKCS12_ALLOW_SUN_SECRET_KEYS
See Also:
Constant Field Values

PKCS1_STRICT_DIGESTINFO

public static final java.lang.String PKCS1_STRICT_DIGESTINFO
See Also:
Constant Field Values

JSSE_HOSTNAME_CHECK_CN_FALLBACK

public static final java.lang.String JSSE_HOSTNAME_CHECK_CN_FALLBACK
See Also:
Constant Field Values

JSSE_USE_NAMED_GROUPS_ORDER

public static final java.lang.String JSSE_USE_NAMED_GROUPS_ORDER
See Also:
Constant Field Values

JSSE_CLIENT_ENABLE_DELEGATED_TASKS

public static final java.lang.String JSSE_CLIENT_ENABLE_DELEGATED_TASKS
See Also:
Constant Field Values

JSSE_SERVER_ENABLE_DELEGATED_TASKS

public static final java.lang.String JSSE_SERVER_ENABLE_DELEGATED_TASKS
See Also:
Constant Field Values

DRBG_EFFECTIVE_256BITS_ENTROPY

public static final java.lang.String DRBG_EFFECTIVE_256BITS_ENTROPY
See Also:
Constant Field Values

DRBG_ENTROPY_SOURCE

public static final java.lang.String DRBG_ENTROPY_SOURCE
See Also:
Constant Field Values

DRBG_ENTROPY_THREAD

public static final java.lang.String DRBG_ENTROPY_THREAD
See Also:
Constant Field Values

DRBG_GATHER_PAUSE_SECS

public static final java.lang.String DRBG_GATHER_PAUSE_SECS
See Also:
Constant Field Values

ASN1_ALLOW_NON_DER_TIME

public static final java.lang.String ASN1_ALLOW_NON_DER_TIME
See Also:
Constant Field Values

ASN1_ALLOW_ZONELESS_UTCTIME

public static final java.lang.String ASN1_ALLOW_ZONELESS_UTCTIME
See Also:
Constant Field Values

ASN1_MAX_CONS_DEPTH

public static final java.lang.String ASN1_MAX_CONS_DEPTH
See Also:
Constant Field Values

ASN1_MAX_LIMIT

public static final java.lang.String ASN1_MAX_LIMIT
See Also:
Constant Field Values

DH_MAX_SIZE

public static final java.lang.String DH_MAX_SIZE
See Also:
Constant Field Values

DH_ALLOW_SHORT_PRIVATE_VALUE

public static final java.lang.String DH_ALLOW_SHORT_PRIVATE_VALUE
See Also:
Constant Field Values

DSA_MAX_SIZE

public static final java.lang.String DSA_MAX_SIZE
See Also:
Constant Field Values

BCFKS_MAX_IT_COUNT

public static final java.lang.String BCFKS_MAX_IT_COUNT
See Also:
Constant Field Values

BCFKS_MAX_SCRYPT_MEMORY

public static final java.lang.String BCFKS_MAX_SCRYPT_MEMORY
See Also:
Constant Field Values

BCFKS_STORE_IT_COUNT

public static final java.lang.String BCFKS_STORE_IT_COUNT
See Also:
Constant Field Values

BCFKS_SCRYPT_P_EQ_R

public static final java.lang.String BCFKS_SCRYPT_P_EQ_R
See Also:
Constant Field Values

PBE_MAX_ITERATION_COUNT

public static final java.lang.String PBE_MAX_ITERATION_COUNT
See Also:
Constant Field Values

PBKDF2_LEGACY_CIPHER_PRF

public static final java.lang.String PBKDF2_LEGACY_CIPHER_PRF
See Also:
Constant Field Values

PBE_MAX_SCRYPT_MEMORY

public static final java.lang.String PBE_MAX_SCRYPT_MEMORY
See Also:
Constant Field Values

PKMAC_MAX_ITERATION_COUNT

public static final java.lang.String PKMAC_MAX_ITERATION_COUNT
See Also:
Constant Field Values

X509_MAX_POLICY_NODES

public static final java.lang.String X509_MAX_POLICY_NODES
See Also:
Constant Field Values

X509_MAX_CERT_PATH_BUILD_NODES

public static final java.lang.String X509_MAX_CERT_PATH_BUILD_NODES
See Also:
Constant Field Values

X509_ALLOW_LENIENT_RFC822_NAME

public static final java.lang.String X509_ALLOW_LENIENT_RFC822_NAME
See Also:
Constant Field Values

X509_ALLOW_EMPTY_ISSUER_CERT

public static final java.lang.String X509_ALLOW_EMPTY_ISSUER_CERT
See Also:
Constant Field Values

GCM_ALLOW_SHORT_TAGS

public static final java.lang.String GCM_ALLOW_SHORT_TAGS
See Also:
Constant Field Values

BKS_ENABLE_V1

public static final java.lang.String BKS_ENABLE_V1
See Also:
Constant Field Values

X509_SGP22_NAME_CONSTRAINTS

public static final java.lang.String X509_SGP22_NAME_CONSTRAINTS
Opt in to the relaxed directoryName name-constraint matching required by GSMA SGP.22 v2.5 (Remote SIM Provisioning). Looser than RFC 5280 7.1, so defaults to off. See github #2327.

See Also:
Constant Field Values

EC_MAX_F2M_FIELD_SIZE

public static final java.lang.String EC_MAX_F2M_FIELD_SIZE
Upper bound on the field size m accepted when building a characteristic-2 (F2m) elliptic curve; an unbounded m from explicit EC parameters is an import-time CPU-exhaustion vector (CVE-2024-29857). Default 1142 (twice 571).

See Also:
Constant Field Values

MIME_MAX_DEPTH

public static final java.lang.String MIME_MAX_DEPTH
See Also:
Constant Field Values

CMS_ALLOW_LEGACY_KEYAGREE_KDF

public static final java.lang.String CMS_ALLOW_LEGACY_KEYAGREE_KDF
Whether a CMS key agreement recipient, having failed to unwrap the content-encryption key with the RFC 5753 derivation, may retry with the raw user keying material as the KDF's SharedInfo.

RFC 5753 sec. 7.2 fixes the SharedInfo of the ECDH and 1-Pass ECMQV KDF as the DER-encoded ECC-CMS-SharedInfo, which carries the ukm (the addedukm for ECMQV) as its entityUInfo. Some senders feed the KDF the ukm itself instead, and BC did so for ECMQV from 1.53 to 1.86. Default (unset or "true") keeps that retry, so such messages remain readable; set to "false" to accept only the RFC 5753 form (and, for the SHA-1 KDF schemes, the RFC 3278 form that preceded it). Read via isOverrideSet(String, boolean).

See Also:
Constant Field Values

CMS_MAX_DIGEST_ALGORITHMS

public static final java.lang.String CMS_MAX_DIGEST_ALGORITHMS
The largest number of distinct digest algorithms BC will compute over the content of one SignedData message: the content digests CMSSignedData computes while its signers are verified (one per digest algorithm, shared by the signers using it) and the digest calculators CMSSignedDataParser runs over the content for the message's digestAlgorithms field. Each algorithm beyond the limit raises a CMSException. Unset or 0, the default, leaves the number unlimited, so the work a sender can demand is the content length times the algorithms it names. Read via asInteger(String, int).

See Also:
Constant Field Values

CMS_ALLOW_UNAUTHENTICATED_CBC_MAC_IV

public static final java.lang.String CMS_ALLOW_UNAUTHENTICATED_CBC_MAC_IV
Whether a CMS AuthenticatedData message without authenticated attributes may carry a non-zero initialisation vector for a CBC-MAC (des-ede3-cbc or rc2-cbc as its macAlgorithm). Default false.

RFC 5652 sec. 9.2 makes the eContent octets alone the MAC input when authAttrs are absent, so nothing covers the IV carried in the macAlgorithm parameters: the same difference XORed into the IV and the first content block leaves a CBC-MAC unchanged. BC therefore writes these MACs with a zero IV and refuses a non-zero one when authenticated attributes are absent; set to "true" to read such messages, as written by BC before 1.87, accepting that their first eight content bytes are not protected. A message with authenticated attributes is unaffected, as those bind the content.

See Also:
Constant Field Values

TSP_ALLOW_INCONSISTENT_SIGNING_TIME

public static final java.lang.String TSP_ALLOW_INCONSISTENT_SIGNING_TIME
Whether a time-stamp token whose signing-time signed attribute disagrees with the genTime of its TSTInfo is accepted. Default false.

See Also:
Constant Field Values

TSP_ALLOWED_IMPRINT_ALGORITHMS

public static final java.lang.String TSP_ALLOWED_IMPRINT_ALGORITHMS
The hash algorithms (comma separated digest names or OIDs) accepted for a time-stamp token's message imprint.

See Also:
Constant Field Values

CONSTRAINTS_QUANTUM_VULNERABLE

public static final java.lang.String CONSTRAINTS_QUANTUM_VULNERABLE
The default crypto services constraint: "nist", "log", "legacy", "reject" or "none" (the default).

See Also:
Constant Field Values

CONSTRAINTS_ALLOW_OVERRIDE

public static final java.lang.String CONSTRAINTS_ALLOW_OVERRIDE
Whether a constraint installed from a property at start-up may be replaced. Default false.

See Also:
Constant Field Values

SM9_ALLOW_MULTI_USE

public static final java.lang.String SM9_ALLOW_MULTI_USE
Whether one SM9 encryption user key may serve both the SM9 KEM and SM9 public-key decryption within the copy of the library in use. Default false.

See Also:
Constant Field Values
Method Detail

isOverrideSet

public static boolean isOverrideSet(java.lang.String propertyName)
Return whether a particular override has been set to true.

Parameters:
propertyName - the property name for the override.
Returns:
true if the property is set to "true", false otherwise.

isOverrideSet

public static boolean isOverrideSet(java.lang.String propertyName,
                                    boolean defIsTrue)
Return whether a particular override has been set to true.

Parameters:
propertyName - the property name for the override.
Returns:
true if the property is set to "true", false otherwise.

setThreadOverride

public static boolean setThreadOverride(java.lang.String propertyName,
                                        boolean enable)
Enable the specified override property for the current thread only.

Parameters:
propertyName - the property name for the override.
enable - true if the override should be enabled, false if it should be disabled.
Returns:
true if the override was already set true, false otherwise.

removeThreadOverride

public static boolean removeThreadOverride(java.lang.String propertyName)
Remove any value for the specified override property for the current thread only.

Parameters:
propertyName - the property name for the override.
Returns:
true if the override was already set true in thread local, false otherwise.

isOverrideSetTo

public static boolean isOverrideSetTo(java.lang.String propertyName,
                                      boolean isTrue)
Return whether a particular override has been set to false.

Parameters:
propertyName - the property name for the override.
isTrue - true if the override should be true, false otherwise.
Returns:
true if the property is set to the value of isTrue, false otherwise.

asInteger

public static int asInteger(java.lang.String propertyName,
                            int defaultValue)

asBigInteger

public static java.math.BigInteger asBigInteger(java.lang.String propertyName)

asKeySet

public static java.util.Set asKeySet(java.lang.String propertyName)

getPropertyValue

public static java.lang.String getPropertyValue(java.lang.String propertyName)

getPropertyValue

public static java.lang.String getPropertyValue(java.lang.String propertyName,
                                                java.lang.String defValue)

Bouncy Castle Cryptography Library 1.87