|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.X509V3Extension | +--com.rsa.certj.cert.extensions.NetscapeCertType
This class builds and holds the
NetscapeCertType
extension. It can be
used to limit the applications for a certificate. If
this extension exists in a certificate, it will limit
the uses of the certificate to those specified. If the
extension is not present, then the certificate can be
used for all applications except object signing. The
value of this extension is a bit-string.
bit-0 SSL client - this cert is certified for SSL client authentication use bit-1 SSL server - this cert is certified for SSL server authentication use bit-2 S/MIME - this cert is certified for use by clients bit-3 Object Signing - this cert is certified for signing objects such as Java applets and plugins bit-4 Reserved - this bit is reserved for future use bit-5 SSL CA - this cert is certified for issuing certs for SSL use bit-6 S/MIME CA - this cert is certified for issuing certs for S/MIME use bit-7 Object Signing CA - this cert is certified for issuing certs for Object Signing |
netscape OBJECT IDENTIFIER ::= { 2 16 840 1 113730 } netscape-cert-extension OBJECT IDENTIFIER :: = { netscape 1 } netscape-cert-type OBJECT IDENTIFIER ::= { netscape-cert-extension 1 } |
See Also
Field Summary |
|
static int |
CERT_TYPE_BITS
Indicates how many possible
|
static int |
CERT_TYPE_MASK
A mask that indicates which bits are seen. |
static int |
OBJECT_SIGNING
Indicates that this certificate is certified for signing objects such as Java applets and plug-ins. |
static int |
OBJECT_SIGNING_CA
Indicates that this certificate is certified to issue certificates for object signing. |
static int |
RESERVED
Indicates that this bit is reserved for future use. |
static int |
SMIME_CA
Indicates that this certificate is certified to issue certificates for S/MIME use. |
static int |
SMIME_CLIENT
Indicates that this certificate is certified for use by clients for S/MIME use. |
static int |
SSL_CA
Indicates that this certificate is certified for issuing certs for SSL use. |
static int |
SSL_CLIENT
Indicates that this certificate is certified for SSL client authentication use. |
static int |
SSL_SERVER
Indicates that this certificate is certified for SSL server authentication use. |
Constructor Summary |
|
NetscapeCertType()
Constructs an empty |
|
NetscapeCertType(int certType,
boolean criticality)
Constructs a |
Method Summary |
|
clone()
Overrides the default |
|
void |
decodeValue(byte[] valueBER,
int offset)
Decode the value. |
int |
derEncodeValue(byte[] encoding,
int offset)
Place the encoding of the value into encoding, beginning at offset. |
int |
derEncodeValueInit()
Initialize for encoding the value. |
int |
getCertType()
Gets the value of this object, the certificate type bits. |
void |
setCertType(int certType)
Sets the certificate type value. |
boolean |
verifyCertType(int typeToVerify)
Given typeToVerify, an |
Methods inherited from class com.rsa.certj.cert.extensions.X509V3Extension |
extend, getCriticality, getDEREncoding, getDERLen, getExtensionType, getExtensionTypeString, getInstance, getNextBEROffset, isExtensionType, setCriticality, setEncoding, setSpecialOID, setStandardOID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CERT_TYPE_BITS
CertType
bits there are.
In this implementation there are eight bits.public static final int CERT_TYPE_MASK
public static final int SSL_CLIENT
public static final int SSL_SERVER
public static final int SMIME_CLIENT
public static final int OBJECT_SIGNING
public static final int RESERVED
public static final int SSL_CA
public static final int SMIME_CA
public static final int OBJECT_SIGNING_CA
Constructor Detail |
public NetscapeCertType()
NetscapeCertType
object.public NetscapeCertType(int certType, boolean criticality)
NetscapeCertType
object and
initializes it with the given values and the specified criticality.
The value of certType is the
logical bitwise-ORing of the static field values previously
specified in this class.Parameters
certType | The Netscape certificate type value. | ||
criticality | The user-specified criticality. |
Method Detail |
public void decodeValue(byte[] valueBER, int offset) throws CertificateException
Overrides
decodeValue
in class X509V3Extension
Parameters
valueBER | The BER encoding of the extension's value. | ||
offset | The offset into valueBER where the encoding begins. |
Throws
CertificateException
- If the encoding is invalid for this
extension.public void setCertType(int certType)
Parameters
certType | The certificate type value, the result of combining the flags to set for this object with a bitwise OR operation. |
public int getCertType()
0
.
Returns
public boolean verifyCertType(int typeToVerify)
int
set
with flags of the proposed type, this method
verifies that the
extension is set to at least the proposed type. It is
possible to set more bits than those in typeToVerify.Parameters
typeToVerify | A certificate type value,
an |
Returns
boolean
indicating whether
the flags in this extension
are set to the value passed in this method.public int derEncodeValueInit()
Overrides
derEncodeValueInit
in class X509V3Extension
Returns
public int derEncodeValue(byte[] encoding, int offset)
Overrides
derEncodeValue
in class X509V3Extension
Parameters
encoding | The byte array into which the result will be placed. | ||
offset | The offest into encoding where the writing is to begin. |
Returns
public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Overrides
clone
in class X509V3Extension
Returns
NetscapeCertType
object,
a copy of this object.
Throws
CloneNotSupportedException
- If the cloning operation
is not successful.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |