Defines several constants used to determine the purposes for which a key may be used.
The names of these key usage purposes are taken from RFC 2459 (Internet X.509 Public Key
Infrastructure Certificate and CRL Profile) sections 4.2.1.3 (Key Usage) and
4.2.1.13 (Extended Key Usage).
These constants have values that enable them to be used as a bit field.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
CLIENT_AUTHENTICATION
The subject public key is used for
TLS web client authentication.
static long
CODE_SIGNING
The subject public key is used for
signing downloadable executable code.
static long
CRL_SIGN
The subject public key is used for verifying a signature on revocation information (eg. a CRL).
static long
DATA_ENCIPHERMENT
The subject public key is used for enciphering user data, other than cryptographic keys.
static long
DECIPHER_ONLY
The meaning of the DECIPHER_ONLY purpose is undefined unless the key may also be used
for key agreement.
static long
DIGITAL_SIGNATURE
The subject public key is used with a digital signature mechanism to support
security services other than non-repudiation, certificate signing, or revocation
information signing.
static long
EMAIL_PROTECTION
The subject public key is used for
email protection.
static long
EMS_CERTIFICATE
The subject public key is used for
encrypting messages to an Entrust Messaging Server ( EMS ).
static long
ENCIPHER_ONLY
The meaning of the ENCIPHER_ONLY purpose is undefined unless the key may also be used
for key agreement.
static long
KEY_AGREEMENT
The subject public key is used for key agreement.
static long
KEY_CERT_SIGN
The subject public key is used for verifying a signature on certificates.
static long
KEY_ENCIPHERMENT
The subject public key is used for key transport.
static long
NON_REPUDIATION
The subject public key is used to verify digital signatures used to provide a
non-repudiation service which protects against the signing entity falsely denying
some action, excluding certificate or CRL signing.
static int
NUM_KEY_USAGES
Represents the number of Key Usages known.
static long
SERVER_AUTHENTICATION
The subject public key is used for
TLS web server authentication.
static long
TIME_STAMPING
The subject public key is used for
binding the hash of an object to a time from an agreed-upon time source.
The subject public key is used for
TLS web client authentication. This purpose may be consistent with
DIGITAL_SIGNATURE and/or KEY_AGREEMENT.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
CODE_SIGNING
public static final long CODE_SIGNING
The subject public key is used for
signing downloadable executable code. This purpose may be consistent with
DIGITAL_SIGNATURE.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
CRL_SIGN
public static final long CRL_SIGN
The subject public key is used for verifying a signature on revocation information (eg. a CRL).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
DATA_ENCIPHERMENT
public static final long DATA_ENCIPHERMENT
The subject public key is used for enciphering user data, other than cryptographic keys.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
DECIPHER_ONLY
public static final long DECIPHER_ONLY
The meaning of the DECIPHER_ONLY purpose is undefined unless the key may also be used
for key agreement. If both DECIPHER_ONLY and KEY_AGREEMENT purposes are allowed, then the
subject key may be used only for deciphering data while performing key agreement.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
DIGITAL_SIGNATURE
public static final long DIGITAL_SIGNATURE
The subject public key is used with a digital signature mechanism to support
security services other than non-repudiation, certificate signing, or revocation
information signing.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
EMAIL_PROTECTION
public static final long EMAIL_PROTECTION
The subject public key is used for
email protection. This purpose may be consistent with DIGITAL_SIGNATURE,
NON_REPUDIATION, and/or (KEY_ENCIPHERMENT or KEY_AGREEMENT).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
EMS_CERTIFICATE
public static final long EMS_CERTIFICATE
The subject public key is used for
encrypting messages to an Entrust Messaging Server ( EMS ).
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
ENCIPHER_ONLY
public static final long ENCIPHER_ONLY
The meaning of the ENCIPHER_ONLY purpose is undefined unless the key may also be used
for key agreement. If both ENCIPHER_ONLY and KEY_AGREEMENT purposes are allowed, then the
subject key may be used only for enciphering data while performing key agreement.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
KEY_AGREEMENT
public static final long KEY_AGREEMENT
The subject public key is used for key agreement.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
KEY_CERT_SIGN
public static final long KEY_CERT_SIGN
The subject public key is used for verifying a signature on certificates. Only CA certificates
may contain keys used for this purpose.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
KEY_ENCIPHERMENT
public static final long KEY_ENCIPHERMENT
The subject public key is used for key transport.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
NON_REPUDIATION
public static final long NON_REPUDIATION
The subject public key is used to verify digital signatures used to provide a
non-repudiation service which protects against the signing entity falsely denying
some action, excluding certificate or CRL signing.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
NUM_KEY_USAGES
public static final int NUM_KEY_USAGES
Represents the number of Key Usages known.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
SERVER_AUTHENTICATION
public static final long SERVER_AUTHENTICATION
The subject public key is used for
TLS web server authentication. This purpose may be consistent
with DIGITAL_SIGNATURE, KEY_ENCIPHERMENT, or KEY_AGREEMENT.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
TIME_STAMPING
public static final long TIME_STAMPING
The subject public key is used for
binding the hash of an object to a time from an agreed-upon time source.
This purpose may be consistent with DIGITAL_SIGNATURE or NON_REPUDIATION.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Returns an interned object the represents the specified KeyUsage.
Parameters:
usage - The key usage.
Returns:
A Long representing the usage.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
isEncryptKeyUsage
public static boolean isEncryptKeyUsage(long keyUsage)
Returns true if this keyUsage contains elements which relate
to encryption.
Parameters:
keyUsage - the key usage to check for encryption elements.
Returns:
a boolean indicating if the key usage contains elements
which relate to encryption.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
isSignKeyUsage
public static boolean isSignKeyUsage(long keyUsage)
Returns true if this keyUsage contains elements which relate
to signing.
Parameters:
keyUsage - the key usage to check for signing elements.
Returns:
a boolean indicating if the key usage contains elements
which relate to signing.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.