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]
pub fn coerce<T: nsIX509CertCoerce>(&self) -> &T
[src]
Cast this nsIX509Cert
to one of its base interfaces.
impl nsIX509Cert
[src]
pub const UNKNOWN_CERT: i64
UNKNOWN_CERT: i64 = 0
/**
* Constants to classify the type of a certificate.
*/
pub const CA_CERT: i64
CA_CERT: i64 = 1
pub const USER_CERT: i64
USER_CERT: i64 = 2
pub const EMAIL_CERT: i64
EMAIL_CERT: i64 = 4
pub const SERVER_CERT: i64
SERVER_CERT: i64 = 8
pub const ANY_CERT: i64
ANY_CERT: i64 = 65535
pub const CMS_CHAIN_MODE_CertOnly: i64
CMS_CHAIN_MODE_CertOnly: i64 = 1
/**
* Constants for specifying the chain mode when exporting a certificate
*/
pub const CMS_CHAIN_MODE_CertChain: i64
CMS_CHAIN_MODE_CertChain: i64 = 2
pub const CMS_CHAIN_MODE_CertChainWithRoot: i64
CMS_CHAIN_MODE_CertChainWithRoot: i64 = 3
pub unsafe fn GetEmailAddress(&self, aEmailAddress: &mut nsAString) -> nsresult
[src]
/**
* The primary email address of the certificate, if present.
*/
readonly attribute AString emailAddress;
pub unsafe fn GetIsBuiltInRoot(&self, aIsBuiltInRoot: *mut bool) -> nsresult
[src]
/**
* Did this certificate ship with the platform as a built-in root?
*/
[must_use] readonly attribute bool isBuiltInRoot;
pub unsafe fn GetEmailAddresses(
&self,
length: *mut uint32_t,
addresses: *mut *mut *const int16_t
) -> nsresult
[src]
&self,
length: *mut uint32_t,
addresses: *mut *mut *const int16_t
) -> nsresult
/**
* 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);
pub unsafe fn ContainsEmailAddress(
&self,
aEmailAddress: &nsAString,
_retval: *mut bool
) -> nsresult
[src]
&self,
aEmailAddress: &nsAString,
_retval: *mut bool
) -> nsresult
/**
* 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);
pub unsafe fn GetSubjectName(&self, aSubjectName: &mut nsAString) -> nsresult
[src]
/**
* The subject owning the certificate.
*/
readonly attribute AString subjectName;
pub unsafe fn GetCommonName(&self, aCommonName: &mut nsAString) -> nsresult
[src]
/**
* The subject's common name.
*/
readonly attribute AString commonName;
pub unsafe fn GetOrganization(&self, aOrganization: &mut nsAString) -> nsresult
[src]
/**
* The subject's organization.
*/
readonly attribute AString organization;
pub unsafe fn GetOrganizationalUnit(
&self,
aOrganizationalUnit: &mut nsAString
) -> nsresult
[src]
&self,
aOrganizationalUnit: &mut nsAString
) -> nsresult
/**
* The subject's organizational unit.
*/
[must_use] readonly attribute AString organizationalUnit;
pub unsafe fn GetSha256Fingerprint(
&self,
aSha256Fingerprint: &mut nsAString
) -> nsresult
[src]
&self,
aSha256Fingerprint: &mut nsAString
) -> nsresult
/**
* The fingerprint of the certificate's DER encoding,
* calculated using the SHA-256 algorithm.
*/
readonly attribute AString sha256Fingerprint;
pub unsafe fn GetSha1Fingerprint(
&self,
aSha1Fingerprint: &mut nsAString
) -> nsresult
[src]
&self,
aSha1Fingerprint: &mut nsAString
) -> nsresult
/**
* The fingerprint of the certificate's DER encoding,
* calculated using the SHA1 algorithm.
*/
[must_use] readonly attribute AString sha1Fingerprint;
pub unsafe fn GetTokenName(&self, aTokenName: &mut nsAString) -> nsresult
[src]
/**
* A human readable name identifying the hardware or
* software token the certificate is stored on.
*/
readonly attribute AString tokenName;
pub unsafe fn GetIssuerName(&self, aIssuerName: &mut nsAString) -> nsresult
[src]
/**
* The subject identifying the issuer certificate.
*/
readonly attribute AString issuerName;
pub unsafe fn GetSerialNumber(&self, aSerialNumber: &mut nsAString) -> nsresult
[src]
/**
* The serial number the issuer assigned to this certificate.
*/
[must_use] readonly attribute AString serialNumber;
pub unsafe fn GetIssuerCommonName(
&self,
aIssuerCommonName: &mut nsAString
) -> nsresult
[src]
&self,
aIssuerCommonName: &mut nsAString
) -> nsresult
/**
* The issuer subject's common name.
*/
[must_use] readonly attribute AString issuerCommonName;
pub unsafe fn GetIssuerOrganization(
&self,
aIssuerOrganization: &mut nsAString
) -> nsresult
[src]
&self,
aIssuerOrganization: &mut nsAString
) -> nsresult
/**
* The issuer subject's organization.
*/
readonly attribute AString issuerOrganization;
pub unsafe fn GetIssuerOrganizationUnit(
&self,
aIssuerOrganizationUnit: &mut nsAString
) -> nsresult
[src]
&self,
aIssuerOrganizationUnit: &mut nsAString
) -> nsresult
/**
* The issuer subject's organizational unit.
*/
[must_use] readonly attribute AString issuerOrganizationUnit;
pub unsafe fn GetIssuer(&self, aIssuer: *mut *const nsIX509Cert) -> nsresult
[src]
/**
* The certificate used by the issuer to sign this certificate.
*/
[must_use] readonly attribute nsIX509Cert issuer;
pub unsafe fn GetValidity(
&self,
aValidity: *mut *const nsIX509CertValidity
) -> nsresult
[src]
&self,
aValidity: *mut *const nsIX509CertValidity
) -> nsresult
/**
* This certificate's validity period.
*/
readonly attribute nsIX509CertValidity validity;
pub unsafe fn GetDbKey(&self, aDbKey: &mut nsACString) -> nsresult
[src]
/**
* A unique identifier of this certificate within the local storage.
*/
[must_use] readonly attribute ACString dbKey;
pub unsafe fn GetDisplayName(&self, aDisplayName: &mut nsAString) -> nsresult
[src]
/**
* A human readable identifier to label this certificate.
*/
[must_use] readonly attribute AString displayName;
pub unsafe fn GetCertType(&self, aCertType: *mut uint32_t) -> nsresult
[src]
/**
* Type of this certificate
*/
readonly attribute unsigned long certType;
pub unsafe fn GetIsSelfSigned(&self, aIsSelfSigned: *mut bool) -> nsresult
[src]
/**
* True if the certificate is self-signed. CA issued
* certificates are always self-signed.
*/
[must_use] readonly attribute boolean isSelfSigned;
pub unsafe fn GetChain(&self, _retval: *mut *const nsIArray) -> nsresult
[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 ();
pub unsafe fn GetKeyUsages(&self, aKeyUsages: &mut nsAString) -> nsresult
[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;
pub unsafe fn GetASN1Structure(
&self,
aASN1Structure: *mut *const nsIASN1Object
) -> nsresult
[src]
&self,
aASN1Structure: *mut *const nsIASN1Object
) -> nsresult
/**
* 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;
pub unsafe fn GetRawDER(
&self,
length: *mut uint32_t,
data: *mut *mut uint8_t
) -> nsresult
[src]
&self,
length: *mut uint32_t,
data: *mut *mut uint8_t
) -> nsresult
/**
* 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);
pub unsafe fn Equals(
&self,
other: *const nsIX509Cert,
_retval: *mut bool
) -> nsresult
[src]
&self,
other: *const nsIX509Cert,
_retval: *mut bool
) -> nsresult
/**
* Test whether two certificate instances represent the
* same certificate.
*
* @return Whether the certificates are equal
*/
[must_use] boolean equals (in nsIX509Cert other);
pub unsafe fn GetSha256SubjectPublicKeyInfoDigest(
&self,
aSha256SubjectPublicKeyInfoDigest: &mut nsACString
) -> nsresult
[src]
&self,
aSha256SubjectPublicKeyInfoDigest: &mut nsACString
) -> nsresult
/**
* The base64 encoding of the DER encoded public key info using the specified
* digest.
*/
[must_use] readonly attribute ACString sha256SubjectPublicKeyInfoDigest;
pub unsafe fn ExportAsCMS(
&self,
chainMode: uint32_t,
length: *mut uint32_t,
data: *mut *mut uint8_t
) -> nsresult
[src]
&self,
chainMode: uint32_t,
length: *mut uint32_t,
data: *mut *mut uint8_t
) -> nsresult
/**
* 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);
pub unsafe fn MarkForPermDeletion(&self) -> nsresult
[src]
/**
* Either delete the certificate from all cert databases,
* or mark it as untrusted.
*/
[must_use] void markForPermDeletion ();
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIX509Cert
[src]
const IID: nsIID
IID: nsIID = nsID(3183712154, 21538, 19669, [133, 137, 105, 107, 110, 150, 234, 131])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIX509Cert
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.