Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIX509Cert Interface Reference

This represents a X.509 certificate. More...

import "nsIX509Cert.idl";

Inheritance diagram for nsIX509Cert:
Inheritance graph
[legend]
Collaboration diagram for nsIX509Cert:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void getEmailAddresses (out unsigned long length,[retval, array, size_is(length)] out wstring addresses)
 Obtain a list of all email addresses contained in the certificate.
boolean containsEmailAddress (in AString aEmailAddress)
 Check whether a given address is contained in the certificate.
nsIArray getChain ()
 Obtain a list of certificates that contains this certificate and the issuing certificates of all involved issuers, up to the root issuer.
void getUsagesArray (in boolean ignoreOcsp, out PRUint32 verified, out PRUint32 count,[array, size_is(count)] out wstring usages)
 Obtain an array of human readable strings describing the certificate's certified usages.
void getUsagesString (in boolean ignoreOcsp, out PRUint32 verified, out AString usages)
 Obtain a single comma separated human readable string describing the certificate's certified usages.
unsigned long verifyForUsage (in unsigned long usage)
 Verify the certificate for a particular usage.
void getRawDER (out unsigned long length,[retval, array, size_is(length)] out octet data)
 Obtain a raw binary encoding of this certificate in DER format.
boolean equals (in nsIX509Cert other)
 Test whether two certificate instances represent the same certificate.

Public Attributes

readonly attribute AString nickname
 A nickname for the certificate.
readonly attribute AString emailAddress
 The primary email address of the certificate, if present.
readonly attribute AString subjectName
 The subject owning the certificate.
readonly attribute AString commonName
 The subject's common name.
readonly attribute AString organization
 The subject's organization.
readonly attribute AString organizationalUnit
 The subject's organizational unit.
readonly attribute AString sha1Fingerprint
 The fingerprint of the certificate's public key, calculated using the SHA1 algorithm.
readonly attribute AString md5Fingerprint
 The fingerprint of the certificate's public key, calculated using the MD5 algorithm.
readonly attribute AString tokenName
 A human readable name identifying the hardware or software token the certificate is stored on.
readonly attribute AString issuerName
 The subject identifying the issuer certificate.
readonly attribute AString serialNumber
 The serial number the issuer assigned to this certificate.
readonly attribute AString issuerCommonName
 The issuer subject's common name.
readonly attribute AString issuerOrganization
 The issuer subject's organization.
readonly attribute AString issuerOrganizationUnit
 The issuer subject's organizational unit.
readonly attribute nsIX509Cert issuer
 The certificate used by the issuer to sign this certificate.
readonly attribute
nsIX509CertValidity 
validity
 This certificate's validity period.
readonly attribute string dbKey
 A unique identifier of this certificate within the local storage.
readonly attribute string windowTitle
 A human readable identifier to label this certificate.
const unsigned long UNKNOWN_CERT = 0
 Constants to classify the type of a certificate.
const unsigned long CA_CERT = 1 << 0
const unsigned long USER_CERT = 1 << 1
const unsigned long EMAIL_CERT = 1 << 2
const unsigned long SERVER_CERT = 1 << 3
const unsigned long VERIFIED_OK = 0
 Constants for certificate verification results.
const unsigned long NOT_VERIFIED_UNKNOWN = 1 << 0
const unsigned long CERT_REVOKED = 1 << 1
const unsigned long CERT_EXPIRED = 1 << 2
const unsigned long CERT_NOT_TRUSTED = 1 << 3
const unsigned long ISSUER_NOT_TRUSTED = 1 << 4
const unsigned long ISSUER_UNKNOWN = 1 << 5
const unsigned long INVALID_CA = 1 << 6
const unsigned long USAGE_NOT_ALLOWED = 1 << 7
const unsigned long CERT_USAGE_SSLClient = 0
 Constants that describe the certified usages of a certificate.
const unsigned long CERT_USAGE_SSLServer = 1
const unsigned long CERT_USAGE_SSLServerWithStepUp = 2
const unsigned long CERT_USAGE_SSLCA = 3
const unsigned long CERT_USAGE_EmailSigner = 4
const unsigned long CERT_USAGE_EmailRecipient = 5
const unsigned long CERT_USAGE_ObjectSigner = 6
const unsigned long CERT_USAGE_UserCertImport = 7
const unsigned long CERT_USAGE_VerifyCA = 8
const unsigned long CERT_USAGE_ProtectedObjectSigner = 9
const unsigned long CERT_USAGE_StatusResponder = 10
const unsigned long CERT_USAGE_AnyCA = 11
readonly attribute nsIASN1Object ASN1Structure
 This is the attribute which describes the ASN1 layout of the certificate.

Detailed Description

This represents a X.509 certificate.

FROZEN

Definition at line 52 of file nsIX509Cert.idl.


Member Function Documentation

boolean nsIX509Cert::containsEmailAddress ( in AString  aEmailAddress)

Check whether a given address is contained in the certificate.

The comparison will convert the email address to lowercase. The behaviour for non ASCII characters is undefined.

Parameters:
aEmailAddressThe address to search for.
Returns:
True if the address is contained in the certificate.

Test whether two certificate instances represent the same certificate.

Returns:
Whether the certificates are equal

Obtain a list of certificates that contains this certificate and the issuing certificates of all involved issuers, up to the root issuer.

Returns:
The chain of certifficates including the issuers.
void nsIX509Cert::getEmailAddresses ( out unsigned long  length,
[retval, array, size_is(length)] out wstring  addresses 
)

Obtain a list of all email addresses contained in the certificate.

Parameters:
lengthThe number of strings in the returned array.
Returns:
An array of email addresses.
void nsIX509Cert::getRawDER ( out unsigned long  length,
[retval, array, size_is(length)] out octet  data 
)

Obtain a raw binary encoding of this certificate in DER format.

Parameters:
lengthThe number of bytes in the binary encoding.
dataThe bytes representing the DER encoded certificate.
void nsIX509Cert::getUsagesArray ( in boolean  ignoreOcsp,
out PRUint32  verified,
out PRUint32  count,
[array, size_is(count)] out wstring  usages 
)

Obtain an array of human readable strings describing the certificate's certified usages.

Parameters:
ignoreOcspDo not use OCSP even if it is currently activated.
verifiedThe certificate verification result, see constants.
countThe number of human readable usages returned.
usagesThe array of human readable usages.
void nsIX509Cert::getUsagesString ( in boolean  ignoreOcsp,
out PRUint32  verified,
out AString  usages 
)

Obtain a single comma separated human readable string describing the certificate's certified usages.

Parameters:
ignoreOcspDo not use OCSP even if it is currently activated.
verifiedThe certificate verification result, see constants.
purposesThe string listing the usages.
unsigned long nsIX509Cert::verifyForUsage ( in unsigned long  usage)

Verify the certificate for a particular usage.

Returns:
The certificate verification result, see constants.

Member Data Documentation

This is the attribute which describes the ASN1 layout of the certificate.

This can be used when doing a "pretty print" of the certificate's ASN1 structure.

Definition at line 251 of file nsIX509Cert.idl.

const unsigned long nsIX509Cert::CA_CERT = 1 << 0

Definition at line 172 of file nsIX509Cert.idl.

Definition at line 183 of file nsIX509Cert.idl.

Definition at line 184 of file nsIX509Cert.idl.

Definition at line 182 of file nsIX509Cert.idl.

Definition at line 204 of file nsIX509Cert.idl.

Definition at line 198 of file nsIX509Cert.idl.

Definition at line 197 of file nsIX509Cert.idl.

Definition at line 199 of file nsIX509Cert.idl.

Definition at line 202 of file nsIX509Cert.idl.

Definition at line 196 of file nsIX509Cert.idl.

Constants that describe the certified usages of a certificate.

Definition at line 193 of file nsIX509Cert.idl.

Definition at line 194 of file nsIX509Cert.idl.

Definition at line 195 of file nsIX509Cert.idl.

Definition at line 203 of file nsIX509Cert.idl.

Definition at line 200 of file nsIX509Cert.idl.

Definition at line 201 of file nsIX509Cert.idl.

The subject's common name.

Definition at line 93 of file nsIX509Cert.idl.

A unique identifier of this certificate within the local storage.

Definition at line 161 of file nsIX509Cert.idl.

const unsigned long nsIX509Cert::EMAIL_CERT = 1 << 2

Definition at line 174 of file nsIX509Cert.idl.

The primary email address of the certificate, if present.

Definition at line 62 of file nsIX509Cert.idl.

const unsigned long nsIX509Cert::INVALID_CA = 1 << 6

Definition at line 187 of file nsIX509Cert.idl.

The certificate used by the issuer to sign this certificate.

Definition at line 151 of file nsIX509Cert.idl.

Definition at line 185 of file nsIX509Cert.idl.

Definition at line 186 of file nsIX509Cert.idl.

The issuer subject's common name.

Definition at line 136 of file nsIX509Cert.idl.

The subject identifying the issuer certificate.

Definition at line 126 of file nsIX509Cert.idl.

The issuer subject's organization.

Definition at line 141 of file nsIX509Cert.idl.

The issuer subject's organizational unit.

Definition at line 146 of file nsIX509Cert.idl.

The fingerprint of the certificate's public key, calculated using the MD5 algorithm.

Definition at line 115 of file nsIX509Cert.idl.

readonly attribute AString nsIX509Cert::nickname

A nickname for the certificate.

Definition at line 57 of file nsIX509Cert.idl.

Definition at line 181 of file nsIX509Cert.idl.

The subject's organization.

Definition at line 98 of file nsIX509Cert.idl.

The subject's organizational unit.

Definition at line 103 of file nsIX509Cert.idl.

The serial number the issuer assigned to this certificate.

Definition at line 131 of file nsIX509Cert.idl.

const unsigned long nsIX509Cert::SERVER_CERT = 1 << 3

Definition at line 175 of file nsIX509Cert.idl.

The fingerprint of the certificate's public key, calculated using the SHA1 algorithm.

Definition at line 109 of file nsIX509Cert.idl.

The subject owning the certificate.

Definition at line 88 of file nsIX509Cert.idl.

A human readable name identifying the hardware or software token the certificate is stored on.

Definition at line 121 of file nsIX509Cert.idl.

Constants to classify the type of a certificate.

Definition at line 171 of file nsIX509Cert.idl.

Definition at line 188 of file nsIX509Cert.idl.

const unsigned long nsIX509Cert::USER_CERT = 1 << 1

Definition at line 173 of file nsIX509Cert.idl.

This certificate's validity period.

Definition at line 156 of file nsIX509Cert.idl.

Constants for certificate verification results.

Definition at line 180 of file nsIX509Cert.idl.

A human readable identifier to label this certificate.

Definition at line 166 of file nsIX509Cert.idl.


The documentation for this interface was generated from the following file: