net.rim.device.api.crypto.certificate
Class KeyUsage
java.lang.Object
net.rim.device.api.crypto.certificate.KeyUsage
public final class KeyUsage
- extends Object
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.
NUM_KEY_USAGES
indicates how many key usages are known.
- See Also:
Certificate.queryKeyUsage(long)
,
KeyUsageResult
- 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.
- Since:
- BlackBerry API 3.6.0
Field Summary |
|
static long |
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. |
Method Summary |
|
static Long |
getLong(long usage)
Returns an interned object the represents the specified KeyUsage . |
|
static boolean |
isEncryptKeyUsage(long keyUsage)
Returns true if this keyUsage contains elements which relate
to encryption. |
|
static boolean |
isSignKeyUsage(long keyUsage)
Returns true if this keyUsage contains elements which relate
to 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.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
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.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
KEY_ENCIPHERMENT
public static final long KEY_ENCIPHERMENT
- The subject public key is used for key transport.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
DATA_ENCIPHERMENT
public static final long DATA_ENCIPHERMENT
- The subject public key is used for enciphering user data, other than cryptographic keys.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
KEY_AGREEMENT
public static final long KEY_AGREEMENT
- The subject public key is used for key agreement.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
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.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
CRL_SIGN
public static final long CRL_SIGN
- The subject public key is used for verifying a signature on revocation information (eg. a CRL).
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
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.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
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.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
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.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
CLIENT_AUTHENTICATION
public static final long CLIENT_AUTHENTICATION
- The subject public key is used for
TLS web client authentication. This purpose may be consistent with
DIGITAL_SIGNATURE and/or KEY_AGREEMENT.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
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.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
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).
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
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.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
EMS_CERTIFICATE
public static final long EMS_CERTIFICATE
- The subject public key is used for
encrypting messages to an Entrust Messaging Server ( EMS ).
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 4.0.0
NUM_KEY_USAGES
public static final int NUM_KEY_USAGES
- Represents the number of Key Usages known.
- See Also:
- Constant Field Values
- 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.
- Since:
- BlackBerry API 3.6.0
getLong
public static Long getLong(long usage)
- Returns an interned object the represents the specified
KeyUsage
.
- Parameters:
usage
- The key usage.
- Returns:
- A Long representing the usage.
- 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.
- Since:
- BlackBerry API 3.6.0
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.
- 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.
- Since:
- BlackBerry API 4.0.0
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.
- 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.
- Since:
- BlackBerry API 4.0.0
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.