public class X509KeyUsage extends AbstractX509Extension
http://tools.ietf.org/html/rfc5280| Modifier and Type | Field and Description |
|---|---|
static int |
CRL_SIGN |
static int |
DATA_ENCIPHERMENT |
static int |
DECIPHER_ONLY |
static int |
DIGITAL_SIGNATURE |
static int |
ENCIPHER_ONLY |
static java.lang.String |
IDENTIFIER |
static int |
KEY_AGREEMENT |
static int |
KEY_CERT_SIGN |
static int |
KEY_ENCIPHERMENT |
static int |
NON_REPUDIATION |
| Constructor and Description |
|---|
X509KeyUsage(mybouncycastle.org.bouncycastle.asn1.ASN1Sequence a_extension)
Creates an new X509KeyUsage object from a BouncyCastle DERSequence
|
X509KeyUsage(int a_usage)
Creates a new X509KeyUsage object from the specified usage integer.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsCRLSign() |
boolean |
allowsDataEncipherment() |
boolean |
allowsDecipherOnly() |
boolean |
allowsDigitalSignature() |
boolean |
allowsEncipherOnly() |
boolean |
allowsKeyAgreement() |
boolean |
allowsKeyCertSign() |
boolean |
allowsKeyEncipherment() |
boolean |
allowsNonRepudiation() |
java.lang.String |
getName()
Returns the human-readable name of this extension.
|
java.lang.String |
getUsageString(int a_usage)
Translate a single usage-bitstring (no combination) into a human-readable
String.
|
java.util.Vector |
getValues()
This method returns all values of this extension in separated String objects.
|
boolean |
isAllowedUsage(int a_usage) |
equals, getDEROctets, getIdentifier, hashCode, isCritical, toStringpublic static final java.lang.String IDENTIFIER
public static final int DIGITAL_SIGNATURE
public static final int NON_REPUDIATION
public static final int KEY_ENCIPHERMENT
public static final int DATA_ENCIPHERMENT
public static final int KEY_AGREEMENT
public static final int KEY_CERT_SIGN
public static final int CRL_SIGN
public static final int ENCIPHER_ONLY
public static final int DECIPHER_ONLY
public X509KeyUsage(int a_usage)
a_usage - org.bouncycastle.asn1.x509.KeyUsage;public X509KeyUsage(mybouncycastle.org.bouncycastle.asn1.ASN1Sequence a_extension)
a_extension - the extions as ASN1Sequencepublic java.lang.String getName()
AbstractX509ExtensiongetName in class AbstractX509Extensionpublic java.util.Vector getValues()
AbstractX509ExtensiongetValues in class AbstractX509Extensionpublic java.lang.String getUsageString(int a_usage)
a_usage - a single usagepublic boolean isAllowedUsage(int a_usage)
a_usage - a (combination of) usage(s) to test against the extension's
allowed usages.true if all of the usages are allowed or
false otherwise.public boolean allowsDigitalSignature()
public boolean allowsNonRepudiation()
public boolean allowsKeyEncipherment()
public boolean allowsDataEncipherment()
public boolean allowsKeyAgreement()
public boolean allowsKeyCertSign()
public boolean allowsCRLSign()
public boolean allowsEncipherOnly()
public boolean allowsDecipherOnly()
Copyright © 2023. All rights reserved.