PageRenderTime 86ms CodeModel.GetById 40ms app.highlight 18ms RepoModel.GetById 22ms app.codeStats 1ms

/gecko_api/include/nsIX509Cert.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 595 lines | 285 code | 107 blank | 203 comment | 0 complexity | 9b812c60a42283959a13e14264b8f659 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/security/manager/ssl/public/nsIX509Cert.idl
  3 */
  4
  5#ifndef __gen_nsIX509Cert_h__
  6#define __gen_nsIX509Cert_h__
  7
  8
  9#ifndef __gen_nsISupports_h__
 10#include "nsISupports.h"
 11#endif
 12
 13/* For IDL files that don't want to include root IDL files. */
 14#ifndef NS_NO_VTABLE
 15#define NS_NO_VTABLE
 16#endif
 17class nsIArray; /* forward declaration */
 18
 19class nsIX509CertValidity; /* forward declaration */
 20
 21class nsIASN1Object; /* forward declaration */
 22
 23
 24/* starting interface:    nsIX509Cert */
 25#define NS_IX509CERT_IID_STR "f0980f60-ee3d-11d4-998b-00b0d02354a0"
 26
 27#define NS_IX509CERT_IID \
 28  {0xf0980f60, 0xee3d, 0x11d4, \
 29    { 0x99, 0x8b, 0x00, 0xb0, 0xd0, 0x23, 0x54, 0xa0 }}
 30
 31/**
 32 * This represents a X.509 certificate.
 33 *
 34 * @status FROZEN
 35 */
 36class NS_NO_VTABLE NS_SCRIPTABLE nsIX509Cert : public nsISupports {
 37 public: 
 38
 39  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IX509CERT_IID)
 40
 41  /**
 42   *  A nickname for the certificate.
 43   */
 44  /* readonly attribute AString nickname; */
 45  NS_SCRIPTABLE NS_IMETHOD GetNickname(nsAString & aNickname) = 0;
 46
 47  /**
 48   *  The primary email address of the certificate, if present.
 49   */
 50  /* readonly attribute AString emailAddress; */
 51  NS_SCRIPTABLE NS_IMETHOD GetEmailAddress(nsAString & aEmailAddress) = 0;
 52
 53  /**
 54   *  Obtain a list of all email addresses
 55   *  contained in the certificate.
 56   *
 57   *  @param length The number of strings in the returned array.
 58   *  @return An array of email addresses.
 59   */
 60  /* void getEmailAddresses (out unsigned long length, [array, size_is (length), retval] out wstring addresses); */
 61  NS_SCRIPTABLE NS_IMETHOD GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses) = 0;
 62
 63  /**
 64   *  Check whether a given address is contained in the certificate.
 65   *  The comparison will convert the email address to lowercase.
 66   *  The behaviour for non ASCII characters is undefined.
 67   *
 68   *  @param aEmailAddress The address to search for.
 69   *                
 70   *  @return True if the address is contained in the certificate.
 71   */
 72  /* boolean containsEmailAddress (in AString aEmailAddress); */
 73  NS_SCRIPTABLE NS_IMETHOD ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval) = 0;
 74
 75  /**
 76   *  The subject owning the certificate.
 77   */
 78  /* readonly attribute AString subjectName; */
 79  NS_SCRIPTABLE NS_IMETHOD GetSubjectName(nsAString & aSubjectName) = 0;
 80
 81  /**
 82   *  The subject's common name.
 83   */
 84  /* readonly attribute AString commonName; */
 85  NS_SCRIPTABLE NS_IMETHOD GetCommonName(nsAString & aCommonName) = 0;
 86
 87  /**
 88   *  The subject's organization.
 89   */
 90  /* readonly attribute AString organization; */
 91  NS_SCRIPTABLE NS_IMETHOD GetOrganization(nsAString & aOrganization) = 0;
 92
 93  /**
 94   *  The subject's organizational unit.
 95   */
 96  /* readonly attribute AString organizationalUnit; */
 97  NS_SCRIPTABLE NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) = 0;
 98
 99  /**
100   *  The fingerprint of the certificate's public key,
101   *  calculated using the SHA1 algorithm.
102   */
103  /* readonly attribute AString sha1Fingerprint; */
104  NS_SCRIPTABLE NS_IMETHOD GetSha1Fingerprint(nsAString & aSha1Fingerprint) = 0;
105
106  /**
107   *  The fingerprint of the certificate's public key,
108   *  calculated using the MD5 algorithm.
109   */
110  /* readonly attribute AString md5Fingerprint; */
111  NS_SCRIPTABLE NS_IMETHOD GetMd5Fingerprint(nsAString & aMd5Fingerprint) = 0;
112
113  /**
114   *  A human readable name identifying the hardware or
115   *  software token the certificate is stored on.
116   */
117  /* readonly attribute AString tokenName; */
118  NS_SCRIPTABLE NS_IMETHOD GetTokenName(nsAString & aTokenName) = 0;
119
120  /**
121   *  The subject identifying the issuer certificate.
122   */
123  /* readonly attribute AString issuerName; */
124  NS_SCRIPTABLE NS_IMETHOD GetIssuerName(nsAString & aIssuerName) = 0;
125
126  /**
127   *  The serial number the issuer assigned to this certificate.
128   */
129  /* readonly attribute AString serialNumber; */
130  NS_SCRIPTABLE NS_IMETHOD GetSerialNumber(nsAString & aSerialNumber) = 0;
131
132  /**
133   *  The issuer subject's common name.
134   */
135  /* readonly attribute AString issuerCommonName; */
136  NS_SCRIPTABLE NS_IMETHOD GetIssuerCommonName(nsAString & aIssuerCommonName) = 0;
137
138  /**
139   *  The issuer subject's organization.
140   */
141  /* readonly attribute AString issuerOrganization; */
142  NS_SCRIPTABLE NS_IMETHOD GetIssuerOrganization(nsAString & aIssuerOrganization) = 0;
143
144  /**
145   *  The issuer subject's organizational unit.
146   */
147  /* readonly attribute AString issuerOrganizationUnit; */
148  NS_SCRIPTABLE NS_IMETHOD GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit) = 0;
149
150  /**
151   *  The certificate used by the issuer to sign this certificate.
152   */
153  /* readonly attribute nsIX509Cert issuer; */
154  NS_SCRIPTABLE NS_IMETHOD GetIssuer(nsIX509Cert * *aIssuer) = 0;
155
156  /**
157   *  This certificate's validity period.
158   */
159  /* readonly attribute nsIX509CertValidity validity; */
160  NS_SCRIPTABLE NS_IMETHOD GetValidity(nsIX509CertValidity * *aValidity) = 0;
161
162  /**
163   *  A unique identifier of this certificate within the local storage.
164   */
165  /* readonly attribute string dbKey; */
166  NS_SCRIPTABLE NS_IMETHOD GetDbKey(char * *aDbKey) = 0;
167
168  /**
169   *  A human readable identifier to label this certificate.
170   */
171  /* readonly attribute string windowTitle; */
172  NS_SCRIPTABLE NS_IMETHOD GetWindowTitle(char * *aWindowTitle) = 0;
173
174  /**
175   *  Constants to classify the type of a certificate.
176   */
177  enum { UNKNOWN_CERT = 0U };
178
179  enum { CA_CERT = 1U };
180
181  enum { USER_CERT = 2U };
182
183  enum { EMAIL_CERT = 4U };
184
185  enum { SERVER_CERT = 8U };
186
187  /**
188   *  Constants for certificate verification results.
189   */
190  enum { VERIFIED_OK = 0U };
191
192  enum { NOT_VERIFIED_UNKNOWN = 1U };
193
194  enum { CERT_REVOKED = 2U };
195
196  enum { CERT_EXPIRED = 4U };
197
198  enum { CERT_NOT_TRUSTED = 8U };
199
200  enum { ISSUER_NOT_TRUSTED = 16U };
201
202  enum { ISSUER_UNKNOWN = 32U };
203
204  enum { INVALID_CA = 64U };
205
206  enum { USAGE_NOT_ALLOWED = 128U };
207
208  /**
209   *  Constants that describe the certified usages of a certificate.
210   */
211  enum { CERT_USAGE_SSLClient = 0U };
212
213  enum { CERT_USAGE_SSLServer = 1U };
214
215  enum { CERT_USAGE_SSLServerWithStepUp = 2U };
216
217  enum { CERT_USAGE_SSLCA = 3U };
218
219  enum { CERT_USAGE_EmailSigner = 4U };
220
221  enum { CERT_USAGE_EmailRecipient = 5U };
222
223  enum { CERT_USAGE_ObjectSigner = 6U };
224
225  enum { CERT_USAGE_UserCertImport = 7U };
226
227  enum { CERT_USAGE_VerifyCA = 8U };
228
229  enum { CERT_USAGE_ProtectedObjectSigner = 9U };
230
231  enum { CERT_USAGE_StatusResponder = 10U };
232
233  enum { CERT_USAGE_AnyCA = 11U };
234
235  /**
236   *  Obtain a list of certificates that contains this certificate 
237   *  and the issuing certificates of all involved issuers,
238   *  up to the root issuer.
239   *
240   *  @return The chain of certifficates including the issuers.
241   */
242  /* nsIArray getChain (); */
243  NS_SCRIPTABLE NS_IMETHOD GetChain(nsIArray **_retval) = 0;
244
245  /**
246   *  Obtain an array of human readable strings describing
247   *  the certificate's certified usages.
248   *
249   *  @param ignoreOcsp Do not use OCSP even if it is currently activated.
250   *  @param verified The certificate verification result, see constants.
251   *  @param count The number of human readable usages returned.
252   *  @param usages The array of human readable usages.
253   */
254  /* void getUsagesArray (in boolean ignoreOcsp, out PRUint32 verified, out PRUint32 count, [array, size_is (count)] out wstring usages); */
255  NS_SCRIPTABLE NS_IMETHOD GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages) = 0;
256
257  /**
258   *  Obtain a single comma separated human readable string describing
259   *  the certificate's certified usages.
260   *
261   *  @param ignoreOcsp Do not use OCSP even if it is currently activated.
262   *  @param verified The certificate verification result, see constants.
263   *  @param purposes The string listing the usages.
264   */
265  /* void getUsagesString (in boolean ignoreOcsp, out PRUint32 verified, out AString usages); */
266  NS_SCRIPTABLE NS_IMETHOD GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages) = 0;
267
268  /**
269   *  Verify the certificate for a particular usage.
270   *
271   *  @return The certificate verification result, see constants.
272   */
273  /* unsigned long verifyForUsage (in unsigned long usage); */
274  NS_SCRIPTABLE NS_IMETHOD VerifyForUsage(PRUint32 usage, PRUint32 *_retval) = 0;
275
276  /**
277   *  This is the attribute which describes the ASN1 layout
278   *  of the certificate.  This can be used when doing a
279   *  "pretty print" of the certificate's ASN1 structure.
280   */
281  /* readonly attribute nsIASN1Object ASN1Structure; */
282  NS_SCRIPTABLE NS_IMETHOD GetASN1Structure(nsIASN1Object * *aASN1Structure) = 0;
283
284  /**
285   *  Obtain a raw binary encoding of this certificate
286   *  in DER format.
287   *
288   *  @param length The number of bytes in the binary encoding.
289   *  @param data The bytes representing the DER encoded certificate.
290   */
291  /* void getRawDER (out unsigned long length, [array, size_is (length), retval] out octet data); */
292  NS_SCRIPTABLE NS_IMETHOD GetRawDER(PRUint32 *length, PRUint8 **data) = 0;
293
294  /**
295   *  Test whether two certificate instances represent the 
296   *  same certificate.
297   *
298   *  @return Whether the certificates are equal
299   */
300  /* boolean equals (in nsIX509Cert other); */
301  NS_SCRIPTABLE NS_IMETHOD Equals(nsIX509Cert *other, PRBool *_retval) = 0;
302
303};
304
305  NS_DEFINE_STATIC_IID_ACCESSOR(nsIX509Cert, NS_IX509CERT_IID)
306
307/* Use this macro when declaring classes that implement this interface. */
308#define NS_DECL_NSIX509CERT \
309  NS_SCRIPTABLE NS_IMETHOD GetNickname(nsAString & aNickname); \
310  NS_SCRIPTABLE NS_IMETHOD GetEmailAddress(nsAString & aEmailAddress); \
311  NS_SCRIPTABLE NS_IMETHOD GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses); \
312  NS_SCRIPTABLE NS_IMETHOD ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval); \
313  NS_SCRIPTABLE NS_IMETHOD GetSubjectName(nsAString & aSubjectName); \
314  NS_SCRIPTABLE NS_IMETHOD GetCommonName(nsAString & aCommonName); \
315  NS_SCRIPTABLE NS_IMETHOD GetOrganization(nsAString & aOrganization); \
316  NS_SCRIPTABLE NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit); \
317  NS_SCRIPTABLE NS_IMETHOD GetSha1Fingerprint(nsAString & aSha1Fingerprint); \
318  NS_SCRIPTABLE NS_IMETHOD GetMd5Fingerprint(nsAString & aMd5Fingerprint); \
319  NS_SCRIPTABLE NS_IMETHOD GetTokenName(nsAString & aTokenName); \
320  NS_SCRIPTABLE NS_IMETHOD GetIssuerName(nsAString & aIssuerName); \
321  NS_SCRIPTABLE NS_IMETHOD GetSerialNumber(nsAString & aSerialNumber); \
322  NS_SCRIPTABLE NS_IMETHOD GetIssuerCommonName(nsAString & aIssuerCommonName); \
323  NS_SCRIPTABLE NS_IMETHOD GetIssuerOrganization(nsAString & aIssuerOrganization); \
324  NS_SCRIPTABLE NS_IMETHOD GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit); \
325  NS_SCRIPTABLE NS_IMETHOD GetIssuer(nsIX509Cert * *aIssuer); \
326  NS_SCRIPTABLE NS_IMETHOD GetValidity(nsIX509CertValidity * *aValidity); \
327  NS_SCRIPTABLE NS_IMETHOD GetDbKey(char * *aDbKey); \
328  NS_SCRIPTABLE NS_IMETHOD GetWindowTitle(char * *aWindowTitle); \
329  NS_SCRIPTABLE NS_IMETHOD GetChain(nsIArray **_retval); \
330  NS_SCRIPTABLE NS_IMETHOD GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages); \
331  NS_SCRIPTABLE NS_IMETHOD GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages); \
332  NS_SCRIPTABLE NS_IMETHOD VerifyForUsage(PRUint32 usage, PRUint32 *_retval); \
333  NS_SCRIPTABLE NS_IMETHOD GetASN1Structure(nsIASN1Object * *aASN1Structure); \
334  NS_SCRIPTABLE NS_IMETHOD GetRawDER(PRUint32 *length, PRUint8 **data); \
335  NS_SCRIPTABLE NS_IMETHOD Equals(nsIX509Cert *other, PRBool *_retval); 
336
337/* Use this macro to declare functions that forward the behavior of this interface to another object. */
338#define NS_FORWARD_NSIX509CERT(_to) \
339  NS_SCRIPTABLE NS_IMETHOD GetNickname(nsAString & aNickname) { return _to GetNickname(aNickname); } \
340  NS_SCRIPTABLE NS_IMETHOD GetEmailAddress(nsAString & aEmailAddress) { return _to GetEmailAddress(aEmailAddress); } \
341  NS_SCRIPTABLE NS_IMETHOD GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses) { return _to GetEmailAddresses(length, addresses); } \
342  NS_SCRIPTABLE NS_IMETHOD ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval) { return _to ContainsEmailAddress(aEmailAddress, _retval); } \
343  NS_SCRIPTABLE NS_IMETHOD GetSubjectName(nsAString & aSubjectName) { return _to GetSubjectName(aSubjectName); } \
344  NS_SCRIPTABLE NS_IMETHOD GetCommonName(nsAString & aCommonName) { return _to GetCommonName(aCommonName); } \
345  NS_SCRIPTABLE NS_IMETHOD GetOrganization(nsAString & aOrganization) { return _to GetOrganization(aOrganization); } \
346  NS_SCRIPTABLE NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) { return _to GetOrganizationalUnit(aOrganizationalUnit); } \
347  NS_SCRIPTABLE NS_IMETHOD GetSha1Fingerprint(nsAString & aSha1Fingerprint) { return _to GetSha1Fingerprint(aSha1Fingerprint); } \
348  NS_SCRIPTABLE NS_IMETHOD GetMd5Fingerprint(nsAString & aMd5Fingerprint) { return _to GetMd5Fingerprint(aMd5Fingerprint); } \
349  NS_SCRIPTABLE NS_IMETHOD GetTokenName(nsAString & aTokenName) { return _to GetTokenName(aTokenName); } \
350  NS_SCRIPTABLE NS_IMETHOD GetIssuerName(nsAString & aIssuerName) { return _to GetIssuerName(aIssuerName); } \
351  NS_SCRIPTABLE NS_IMETHOD GetSerialNumber(nsAString & aSerialNumber) { return _to GetSerialNumber(aSerialNumber); } \
352  NS_SCRIPTABLE NS_IMETHOD GetIssuerCommonName(nsAString & aIssuerCommonName) { return _to GetIssuerCommonName(aIssuerCommonName); } \
353  NS_SCRIPTABLE NS_IMETHOD GetIssuerOrganization(nsAString & aIssuerOrganization) { return _to GetIssuerOrganization(aIssuerOrganization); } \
354  NS_SCRIPTABLE NS_IMETHOD GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit) { return _to GetIssuerOrganizationUnit(aIssuerOrganizationUnit); } \
355  NS_SCRIPTABLE NS_IMETHOD GetIssuer(nsIX509Cert * *aIssuer) { return _to GetIssuer(aIssuer); } \
356  NS_SCRIPTABLE NS_IMETHOD GetValidity(nsIX509CertValidity * *aValidity) { return _to GetValidity(aValidity); } \
357  NS_SCRIPTABLE NS_IMETHOD GetDbKey(char * *aDbKey) { return _to GetDbKey(aDbKey); } \
358  NS_SCRIPTABLE NS_IMETHOD GetWindowTitle(char * *aWindowTitle) { return _to GetWindowTitle(aWindowTitle); } \
359  NS_SCRIPTABLE NS_IMETHOD GetChain(nsIArray **_retval) { return _to GetChain(_retval); } \
360  NS_SCRIPTABLE NS_IMETHOD GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages) { return _to GetUsagesArray(ignoreOcsp, verified, count, usages); } \
361  NS_SCRIPTABLE NS_IMETHOD GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages) { return _to GetUsagesString(ignoreOcsp, verified, usages); } \
362  NS_SCRIPTABLE NS_IMETHOD VerifyForUsage(PRUint32 usage, PRUint32 *_retval) { return _to VerifyForUsage(usage, _retval); } \
363  NS_SCRIPTABLE NS_IMETHOD GetASN1Structure(nsIASN1Object * *aASN1Structure) { return _to GetASN1Structure(aASN1Structure); } \
364  NS_SCRIPTABLE NS_IMETHOD GetRawDER(PRUint32 *length, PRUint8 **data) { return _to GetRawDER(length, data); } \
365  NS_SCRIPTABLE NS_IMETHOD Equals(nsIX509Cert *other, PRBool *_retval) { return _to Equals(other, _retval); } 
366
367/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
368#define NS_FORWARD_SAFE_NSIX509CERT(_to) \
369  NS_SCRIPTABLE NS_IMETHOD GetNickname(nsAString & aNickname) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNickname(aNickname); } \
370  NS_SCRIPTABLE NS_IMETHOD GetEmailAddress(nsAString & aEmailAddress) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmailAddress(aEmailAddress); } \
371  NS_SCRIPTABLE NS_IMETHOD GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmailAddresses(length, addresses); } \
372  NS_SCRIPTABLE NS_IMETHOD ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ContainsEmailAddress(aEmailAddress, _retval); } \
373  NS_SCRIPTABLE NS_IMETHOD GetSubjectName(nsAString & aSubjectName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSubjectName(aSubjectName); } \
374  NS_SCRIPTABLE NS_IMETHOD GetCommonName(nsAString & aCommonName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommonName(aCommonName); } \
375  NS_SCRIPTABLE NS_IMETHOD GetOrganization(nsAString & aOrganization) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrganization(aOrganization); } \
376  NS_SCRIPTABLE NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrganizationalUnit(aOrganizationalUnit); } \
377  NS_SCRIPTABLE NS_IMETHOD GetSha1Fingerprint(nsAString & aSha1Fingerprint) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSha1Fingerprint(aSha1Fingerprint); } \
378  NS_SCRIPTABLE NS_IMETHOD GetMd5Fingerprint(nsAString & aMd5Fingerprint) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMd5Fingerprint(aMd5Fingerprint); } \
379  NS_SCRIPTABLE NS_IMETHOD GetTokenName(nsAString & aTokenName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTokenName(aTokenName); } \
380  NS_SCRIPTABLE NS_IMETHOD GetIssuerName(nsAString & aIssuerName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuerName(aIssuerName); } \
381  NS_SCRIPTABLE NS_IMETHOD GetSerialNumber(nsAString & aSerialNumber) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSerialNumber(aSerialNumber); } \
382  NS_SCRIPTABLE NS_IMETHOD GetIssuerCommonName(nsAString & aIssuerCommonName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuerCommonName(aIssuerCommonName); } \
383  NS_SCRIPTABLE NS_IMETHOD GetIssuerOrganization(nsAString & aIssuerOrganization) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuerOrganization(aIssuerOrganization); } \
384  NS_SCRIPTABLE NS_IMETHOD GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuerOrganizationUnit(aIssuerOrganizationUnit); } \
385  NS_SCRIPTABLE NS_IMETHOD GetIssuer(nsIX509Cert * *aIssuer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuer(aIssuer); } \
386  NS_SCRIPTABLE NS_IMETHOD GetValidity(nsIX509CertValidity * *aValidity) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValidity(aValidity); } \
387  NS_SCRIPTABLE NS_IMETHOD GetDbKey(char * *aDbKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDbKey(aDbKey); } \
388  NS_SCRIPTABLE NS_IMETHOD GetWindowTitle(char * *aWindowTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowTitle(aWindowTitle); } \
389  NS_SCRIPTABLE NS_IMETHOD GetChain(nsIArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChain(_retval); } \
390  NS_SCRIPTABLE NS_IMETHOD GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsagesArray(ignoreOcsp, verified, count, usages); } \
391  NS_SCRIPTABLE NS_IMETHOD GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsagesString(ignoreOcsp, verified, usages); } \
392  NS_SCRIPTABLE NS_IMETHOD VerifyForUsage(PRUint32 usage, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->VerifyForUsage(usage, _retval); } \
393  NS_SCRIPTABLE NS_IMETHOD GetASN1Structure(nsIASN1Object * *aASN1Structure) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetASN1Structure(aASN1Structure); } \
394  NS_SCRIPTABLE NS_IMETHOD GetRawDER(PRUint32 *length, PRUint8 **data) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRawDER(length, data); } \
395  NS_SCRIPTABLE NS_IMETHOD Equals(nsIX509Cert *other, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(other, _retval); } 
396
397#if 0
398/* Use the code below as a template for the implementation class for this interface. */
399
400/* Header file */
401class nsX509Cert : public nsIX509Cert
402{
403public:
404  NS_DECL_ISUPPORTS
405  NS_DECL_NSIX509CERT
406
407  nsX509Cert();
408
409private:
410  ~nsX509Cert();
411
412protected:
413  /* additional members */
414};
415
416/* Implementation file */
417NS_IMPL_ISUPPORTS1(nsX509Cert, nsIX509Cert)
418
419nsX509Cert::nsX509Cert()
420{
421  /* member initializers and constructor code */
422}
423
424nsX509Cert::~nsX509Cert()
425{
426  /* destructor code */
427}
428
429/* readonly attribute AString nickname; */
430NS_IMETHODIMP nsX509Cert::GetNickname(nsAString & aNickname)
431{
432    return NS_ERROR_NOT_IMPLEMENTED;
433}
434
435/* readonly attribute AString emailAddress; */
436NS_IMETHODIMP nsX509Cert::GetEmailAddress(nsAString & aEmailAddress)
437{
438    return NS_ERROR_NOT_IMPLEMENTED;
439}
440
441/* void getEmailAddresses (out unsigned long length, [array, size_is (length), retval] out wstring addresses); */
442NS_IMETHODIMP nsX509Cert::GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses)
443{
444    return NS_ERROR_NOT_IMPLEMENTED;
445}
446
447/* boolean containsEmailAddress (in AString aEmailAddress); */
448NS_IMETHODIMP nsX509Cert::ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval)
449{
450    return NS_ERROR_NOT_IMPLEMENTED;
451}
452
453/* readonly attribute AString subjectName; */
454NS_IMETHODIMP nsX509Cert::GetSubjectName(nsAString & aSubjectName)
455{
456    return NS_ERROR_NOT_IMPLEMENTED;
457}
458
459/* readonly attribute AString commonName; */
460NS_IMETHODIMP nsX509Cert::GetCommonName(nsAString & aCommonName)
461{
462    return NS_ERROR_NOT_IMPLEMENTED;
463}
464
465/* readonly attribute AString organization; */
466NS_IMETHODIMP nsX509Cert::GetOrganization(nsAString & aOrganization)
467{
468    return NS_ERROR_NOT_IMPLEMENTED;
469}
470
471/* readonly attribute AString organizationalUnit; */
472NS_IMETHODIMP nsX509Cert::GetOrganizationalUnit(nsAString & aOrganizationalUnit)
473{
474    return NS_ERROR_NOT_IMPLEMENTED;
475}
476
477/* readonly attribute AString sha1Fingerprint; */
478NS_IMETHODIMP nsX509Cert::GetSha1Fingerprint(nsAString & aSha1Fingerprint)
479{
480    return NS_ERROR_NOT_IMPLEMENTED;
481}
482
483/* readonly attribute AString md5Fingerprint; */
484NS_IMETHODIMP nsX509Cert::GetMd5Fingerprint(nsAString & aMd5Fingerprint)
485{
486    return NS_ERROR_NOT_IMPLEMENTED;
487}
488
489/* readonly attribute AString tokenName; */
490NS_IMETHODIMP nsX509Cert::GetTokenName(nsAString & aTokenName)
491{
492    return NS_ERROR_NOT_IMPLEMENTED;
493}
494
495/* readonly attribute AString issuerName; */
496NS_IMETHODIMP nsX509Cert::GetIssuerName(nsAString & aIssuerName)
497{
498    return NS_ERROR_NOT_IMPLEMENTED;
499}
500
501/* readonly attribute AString serialNumber; */
502NS_IMETHODIMP nsX509Cert::GetSerialNumber(nsAString & aSerialNumber)
503{
504    return NS_ERROR_NOT_IMPLEMENTED;
505}
506
507/* readonly attribute AString issuerCommonName; */
508NS_IMETHODIMP nsX509Cert::GetIssuerCommonName(nsAString & aIssuerCommonName)
509{
510    return NS_ERROR_NOT_IMPLEMENTED;
511}
512
513/* readonly attribute AString issuerOrganization; */
514NS_IMETHODIMP nsX509Cert::GetIssuerOrganization(nsAString & aIssuerOrganization)
515{
516    return NS_ERROR_NOT_IMPLEMENTED;
517}
518
519/* readonly attribute AString issuerOrganizationUnit; */
520NS_IMETHODIMP nsX509Cert::GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit)
521{
522    return NS_ERROR_NOT_IMPLEMENTED;
523}
524
525/* readonly attribute nsIX509Cert issuer; */
526NS_IMETHODIMP nsX509Cert::GetIssuer(nsIX509Cert * *aIssuer)
527{
528    return NS_ERROR_NOT_IMPLEMENTED;
529}
530
531/* readonly attribute nsIX509CertValidity validity; */
532NS_IMETHODIMP nsX509Cert::GetValidity(nsIX509CertValidity * *aValidity)
533{
534    return NS_ERROR_NOT_IMPLEMENTED;
535}
536
537/* readonly attribute string dbKey; */
538NS_IMETHODIMP nsX509Cert::GetDbKey(char * *aDbKey)
539{
540    return NS_ERROR_NOT_IMPLEMENTED;
541}
542
543/* readonly attribute string windowTitle; */
544NS_IMETHODIMP nsX509Cert::GetWindowTitle(char * *aWindowTitle)
545{
546    return NS_ERROR_NOT_IMPLEMENTED;
547}
548
549/* nsIArray getChain (); */
550NS_IMETHODIMP nsX509Cert::GetChain(nsIArray **_retval)
551{
552    return NS_ERROR_NOT_IMPLEMENTED;
553}
554
555/* void getUsagesArray (in boolean ignoreOcsp, out PRUint32 verified, out PRUint32 count, [array, size_is (count)] out wstring usages); */
556NS_IMETHODIMP nsX509Cert::GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages)
557{
558    return NS_ERROR_NOT_IMPLEMENTED;
559}
560
561/* void getUsagesString (in boolean ignoreOcsp, out PRUint32 verified, out AString usages); */
562NS_IMETHODIMP nsX509Cert::GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages)
563{
564    return NS_ERROR_NOT_IMPLEMENTED;
565}
566
567/* unsigned long verifyForUsage (in unsigned long usage); */
568NS_IMETHODIMP nsX509Cert::VerifyForUsage(PRUint32 usage, PRUint32 *_retval)
569{
570    return NS_ERROR_NOT_IMPLEMENTED;
571}
572
573/* readonly attribute nsIASN1Object ASN1Structure; */
574NS_IMETHODIMP nsX509Cert::GetASN1Structure(nsIASN1Object * *aASN1Structure)
575{
576    return NS_ERROR_NOT_IMPLEMENTED;
577}
578
579/* void getRawDER (out unsigned long length, [array, size_is (length), retval] out octet data); */
580NS_IMETHODIMP nsX509Cert::GetRawDER(PRUint32 *length, PRUint8 **data)
581{
582    return NS_ERROR_NOT_IMPLEMENTED;
583}
584
585/* boolean equals (in nsIX509Cert other); */
586NS_IMETHODIMP nsX509Cert::Equals(nsIX509Cert *other, PRBool *_retval)
587{
588    return NS_ERROR_NOT_IMPLEMENTED;
589}
590
591/* End of implementation class template. */
592#endif
593
594
595#endif /* __gen_nsIX509Cert_h__ */