Struct xpcom::interfaces::nsIX509Cert [] [src]

#[repr(C)]
pub struct nsIX509Cert { /* fields omitted */ }

interface nsIX509Cert : nsISupports

/**
 * This represents a X.509 certificate.
 *
 * NOTE: Service workers persist x.509 certs in object form on disk.  If you
 *       change this uuid you probably need a hack in nsBinaryInputStream to
 *       read the old uuid.  If you change the format of the object
 *       serialization then more complex changes will be needed.
 */

Methods

impl nsIX509Cert
[src]

[src]

Cast this nsIX509Cert to one of its base interfaces.

impl nsIX509Cert
[src]

UNKNOWN_CERT: i64 = 0
/**
   *  Constants to classify the type of a certificate.
   */

CA_CERT: i64 = 1

USER_CERT: i64 = 2

EMAIL_CERT: i64 = 4

SERVER_CERT: i64 = 8

ANY_CERT: i64 = 65535

CMS_CHAIN_MODE_CertOnly: i64 = 1
/**
   *  Constants for specifying the chain mode when exporting a certificate
   */

CMS_CHAIN_MODE_CertChain: i64 = 2

CMS_CHAIN_MODE_CertChainWithRoot: i64 = 3

[src]

/**
   *  The primary email address of the certificate, if present.
   */

readonly attribute AString emailAddress;

[src]

/**
   * Did this certificate ship with the platform as a built-in root?
   */

[must_use] readonly attribute bool isBuiltInRoot;

[src]

/**
   *  Obtain a list of all email addresses
   *  contained in the certificate.
   *
   *  @param length The number of strings in the returned array.
   *  @return An array of email addresses.
   */

[must_use] void getEmailAddresses (out unsigned long length, [array, size_is (length), retval] out wstring addresses);

[src]

/**
   *  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.
   *
   *  @param aEmailAddress The address to search for.
   *
   *  @return True if the address is contained in the certificate.
   */

[must_use] boolean containsEmailAddress (in AString aEmailAddress);

[src]

/**
   *  The subject owning the certificate.
   */

readonly attribute AString subjectName;

[src]

/**
   *  The subject's common name.
   */

readonly attribute AString commonName;

[src]

/**
   *  The subject's organization.
   */

readonly attribute AString organization;

[src]

/**
   *  The subject's organizational unit.
   */

[must_use] readonly attribute AString organizationalUnit;

[src]

/**
   *  The fingerprint of the certificate's DER encoding,
   *  calculated using the SHA-256 algorithm.
   */

readonly attribute AString sha256Fingerprint;

[src]

/**
   *  The fingerprint of the certificate's DER encoding,
   *  calculated using the SHA1 algorithm.
   */

[must_use] readonly attribute AString sha1Fingerprint;

[src]

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

readonly attribute AString tokenName;

[src]

/**
   *  The subject identifying the issuer certificate.
   */

readonly attribute AString issuerName;

[src]

/**
   *  The serial number the issuer assigned to this certificate.
   */

[must_use] readonly attribute AString serialNumber;

[src]

/**
   *  The issuer subject's common name.
   */

[must_use] readonly attribute AString issuerCommonName;

[src]

/**
   *  The issuer subject's organization.
   */

readonly attribute AString issuerOrganization;

[src]

/**
   *  The issuer subject's organizational unit.
   */

[must_use] readonly attribute AString issuerOrganizationUnit;

[src]

/**
   *  The certificate used by the issuer to sign this certificate.
   */

[must_use] readonly attribute nsIX509Cert issuer;

[src]

/**
   *  This certificate's validity period.
   */

readonly attribute nsIX509CertValidity validity;

[src]

/**
   *  A unique identifier of this certificate within the local storage.
   */

[must_use] readonly attribute ACString dbKey;

[src]

/**
   *  A human readable identifier to label this certificate.
   */

[must_use] readonly attribute AString displayName;

[src]

/**
   * Type of this certificate
   */

readonly attribute unsigned long certType;

[src]

/**
   *  True if the certificate is self-signed. CA issued
   *  certificates are always self-signed.
   */

[must_use] readonly attribute boolean isSelfSigned;

[src]

/**
   *  Obtain a list of certificates that contains this certificate
   *  and the issuing certificates of all involved issuers,
   *  up to the root issuer.
   *
   *  @return The chain of certifficates including the issuers.
   */

[must_use] nsIArray getChain ();

[src]

/**
   * A comma separated list of localized strings representing the contents of
   * the certificate's key usage extension, if present. The empty string if the
   * certificate doesn't have the key usage extension, or has an empty extension.
   */

[must_use] readonly attribute AString keyUsages;

[src]

/**
   *  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.
   */

[must_use] readonly attribute nsIASN1Object ASN1Structure;

[src]

/**
   *  Obtain a raw binary encoding of this certificate
   *  in DER format.
   *
   *  @param length The number of bytes in the binary encoding.
   *  @param data The bytes representing the DER encoded certificate.
   */

[must_use] void getRawDER (out unsigned long length, [array, size_is (length), retval] out octet data);

[src]

/**
   *  Test whether two certificate instances represent the
   *  same certificate.
   *
   *  @return Whether the certificates are equal
   */

[must_use] boolean equals (in nsIX509Cert other);

[src]

/**
   * The base64 encoding of the DER encoded public key info using the specified
   * digest.
   */

[must_use] readonly attribute ACString sha256SubjectPublicKeyInfoDigest;

[src]

/**
   *  Obtain the certificate wrapped in a PKCS#7 SignedData structure,
   *  with or without the certificate chain
   *
   *  @param chainMode Whether to include the chain (with or without the root),
                       see CMS_CHAIN_MODE constants.
   *  @param length The number of bytes of the PKCS#7 data.
   *  @param data The bytes representing the PKCS#7 wrapped certificate.
   */

[must_use] void exportAsCMS (in unsigned long chainMode, out unsigned long length, [array, size_is (length), retval] out octet data);

[src]

/**
   * Either delete the certificate from all cert databases,
   * or mark it as untrusted.
   */

[must_use] void markForPermDeletion ();

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIX509Cert
[src]

IID: nsIID = nsID(3183712154, 21538, 19669, [133, 137, 105, 107, 110, 150, 234, 131])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIX509Cert
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIX509Cert
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.