|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.x509.V3Extension | +--iaik.x509.extensions.netscape.NetscapeCertType
This class implements the NetscapeCertType
Extension.
Each Netscape certificate extension is associated with a specific
certificateExtension
object identifier, derived from:
netscape OBJECT IDENTIFIER ::= { 2 16 840 1 113730 } netscape-cert-extension OBJECT IDENTIFIER :: = { netscape 1 }
The object identifier for the NetscapeCertType
extension
is defined as:
netscape-cert-type OBJECT IDENTIFIER ::= { netscape-cert-extension 1 }
which corresponds to the OID string "2.16.840.1.113730.1.1".
The
Netscape Certificate Specification specifies the NetscapeCertType
extension for limting the applications for a certificate. If the extension exists
in a certificate, it will limit the uses of the certificate to those specified.
If the extension is not present, the certificate can be used for all applications
except Object Signing.
The value is a bit-string, where the individual bit positions are defined as:
You may specify some certificate usage type(s) directly when creating a
NetscapeCertType
extension, or you may use the default constructor
and supply the type(s) by using the setCertType
method, e.g.:
NetscapeCertType netscapeCertType = new NetscapeCertType(); netscapeCertType.setCertType(NetscapeCertType.SSL_CLIENT | NetscapeCertType.SSL_SERVER);
V3Extension
,
X509Extensions
Field Summary | |
static int |
OBJECT_SIGNING
Indicates a certificate that is certified for signing objects such as Java applets ans plugins. |
static int |
OBJECT_SIGNING_CA
Indicates a certificate that is certified for issuing certs for Object Signing. |
static ObjectID |
oid
The object ID of the X.509 extension NetscapeCertType. |
static int |
S_MIME
Indicates a certificate that is certified for use by clients. |
static int |
S_MIME_CA
Indicates a certificate that is certified for issuing certs for S/MIME use. |
static int |
SSL_CA
Indicates a certificate that is certified for issuing certs for SSL use. |
static int |
SSL_CLIENT
Indicates a certificate that is certified for SSL client authentication use. |
static int |
SSL_SERVER
Indicates a certificate that is certified for SSL server authentication use. |
Fields inherited from class iaik.x509.V3Extension |
critical |
Constructor Summary | |
NetscapeCertType()
Default constructor. |
|
NetscapeCertType(int type)
Constructs a NetscapeCertType extension with a specified type parameter.
|
Method Summary | |
int |
getCertType()
Returns the usage type value of the certificate as an integer. |
ObjectID |
getObjectID()
Returns the object ID of this NetscapeCertType extension |
int |
hashCode()
Returns a hashcode for this identity. |
void |
init(ASN1Object obj)
Inits this NetscapeCertType implementation with an ASN1object
representing the value of this extension.
|
void |
setCertType(int type)
Sets the usage type of the certificate. |
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this NetscapeCertType
extension object.
|
String |
toString()
Returns a string that represents the contents of this NetscapeCertType extension. |
Methods inherited from class iaik.x509.V3Extension |
getName, isCritical, setCritical |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static ObjectID oid
public static int SSL_CLIENT
public static int SSL_SERVER
public static int S_MIME
public static int OBJECT_SIGNING
public static int SSL_CA
public static int S_MIME_CA
public static int OBJECT_SIGNING_CA
Constructor Detail |
public NetscapeCertType()
NetscapeCertType
object.
Use the setCertType
method for explicitly setting
some particular certificate type(s), e.g.:
NetscapeCertType netscapeCertType = new NetscapeCertType(); netscapeCertType.setCertType(NetscapeCertType.SSL_CLIENT | NetscapeCertType.SSL_SERVER);
public NetscapeCertType(int type)
NetscapeCertType
extension with a specified type parameter.
For instance:
NetscapeCertType netscapeCertType = new NetscapeCertType(NetscapeCertType.SSL_CLIENT | NetscapeCertType.SSL_SERVER);
The following types are supported:
type
- the usage type of the certificateMethod Detail |
public ObjectID getObjectID()
NetscapeCertType
extensiongetObjectID
in class V3Extension
public void init(ASN1Object obj)
NetscapeCertType
implementation with an ASN1object
representing the value of this extension.
The ASN1Object represents a BIT STRING which specifies the particular type(s) of certificate usage.
The given ASN1Object is the one created by toASN1Object()
.
This method is used by the X509Extensions
class when parsing the ASN.1 representation
of a certificate for properly initializing an included
NetscapeCertType extension. This method initializes the
extension only with its value, but not with its critical
specification. For that reason, this method shall not be
explicitly called by an application.
init
in class V3Extension
obj
- the NetscapeCertType as ASN1Objectpublic ASN1Object toASN1Object()
NetscapeCertType
extension object.
The returned ASN1Object represents a BIT STRING which specifies the particular type(s) of certificate usage.
toASN1Object
in class V3Extension
NetscapeCertType
as ASN1Objectpublic void setCertType(int type)
For instance:
NetscapeCertType netscapeCertType = new NetscapeCertType(); netscapeCertType.setCertType(NetscapeCertType.SSL_CLIENT | NetscapeCertType.SSL_SERVER);
The following types are supported:
type
- the type of the certificatepublic int getCertType()
Note the "little endian" representation of the BIT STRING representing the
value of this NetscapeCertType
extension: the most significant
bit indicates the type with the lowest bit value, meaning that the integer
value 128 (binary 10000000, hexadecimal 80) specifies the "SSL_CLIENT" type,
and the integer value 1 specifies the "OBJECT_SIGNING_CA" type.
int
public int hashCode()
hashCode
in class V3Extension
public String toString()
NetscapeCertType
extension.toString
in class Object
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |