/gecko_api/include/nsIX509CertDB.h
C++ Header | 496 lines | 201 code | 70 blank | 225 comment | 0 complexity | e9756f74a2bd3ba86dbfe73941025bf4 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/nsIX509CertDB.idl 3 */ 4 5#ifndef __gen_nsIX509CertDB_h__ 6#define __gen_nsIX509CertDB_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 nsIX509Cert; /* forward declaration */ 20 21class nsILocalFile; /* forward declaration */ 22 23class nsIInterfaceRequestor; /* forward declaration */ 24 25#define NS_X509CERTDB_CONTRACTID "@mozilla.org/security/x509certdb;1" 26 27/* starting interface: nsIX509CertDB */ 28#define NS_IX509CERTDB_IID_STR "da48b3c0-1284-11d5-ac67-000064657374" 29 30#define NS_IX509CERTDB_IID \ 31 {0xda48b3c0, 0x1284, 0x11d5, \ 32 { 0xac, 0x67, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }} 33 34/** 35 * This represents a service to access and manipulate 36 * X.509 certificates stored in a database. 37 * 38 * @status FROZEN 39 */ 40class NS_NO_VTABLE NS_SCRIPTABLE nsIX509CertDB : public nsISupports { 41 public: 42 43 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IX509CERTDB_IID) 44 45 /** 46 * Constants that define which usages a certificate 47 * is trusted for. 48 */ 49 enum { UNTRUSTED = 0U }; 50 51 enum { TRUSTED_SSL = 1U }; 52 53 enum { TRUSTED_EMAIL = 2U }; 54 55 enum { TRUSTED_OBJSIGN = 4U }; 56 57 /** 58 * Given a nickname and optionally a token, 59 * locate the matching certificate. 60 * 61 * @param aToken Optionally limits the scope of 62 * this function to a token device. 63 * Can be null to mean any token. 64 * @param aNickname The nickname to be used as the key 65 * to find a certificate. 66 * 67 * @return The matching certificate if found. 68 */ 69 /* nsIX509Cert findCertByNickname (in nsISupports aToken, in AString aNickname); */ 70 NS_SCRIPTABLE NS_IMETHOD FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval) = 0; 71 72 /** 73 * Will find a certificate based on its dbkey 74 * retrieved by getting the dbKey attribute of 75 * the certificate. 76 * 77 * @param aDBkey Database internal key, as obtained using 78 * attribute dbkey in nsIX509Cert. 79 * @param aToken Optionally limits the scope of 80 * this function to a token device. 81 * Can be null to mean any token. 82 */ 83 /* nsIX509Cert findCertByDBKey (in string aDBkey, in nsISupports aToken); */ 84 NS_SCRIPTABLE NS_IMETHOD FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval) = 0; 85 86 /** 87 * Obtain a list of certificate nicknames from the database. 88 * What the name is depends on type: 89 * user, ca, or server cert - the nickname 90 * email cert - the email address 91 * 92 * @param aToken Optionally limits the scope of 93 * this function to a token device. 94 * Can be null to mean any token. 95 * @param aType Type of certificate to obtain 96 * See certificate type constants in nsIX509Cert. 97 * @param count The number of nicknames in the returned array 98 * @param certNameList The returned array of certificate nicknames. 99 */ 100 /* void findCertNicknames (in nsISupports aToken, in unsigned long aType, out unsigned long count, [array, size_is (count)] out wstring certNameList); */ 101 NS_SCRIPTABLE NS_IMETHOD FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) = 0; 102 103 /** 104 * Find the email encryption certificate by nickname. 105 * 106 * @param aNickname The nickname to be used as the key 107 * to find the certificate. 108 * 109 * @return The matching certificate if found. 110 */ 111 /* nsIX509Cert findEmailEncryptionCert (in AString aNickname); */ 112 NS_SCRIPTABLE NS_IMETHOD FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval) = 0; 113 114 /** 115 * Find the email signing certificate by nickname. 116 * 117 * @param aNickname The nickname to be used as the key 118 * to find the certificate. 119 * 120 * @return The matching certificate if found. 121 */ 122 /* nsIX509Cert findEmailSigningCert (in AString aNickname); */ 123 NS_SCRIPTABLE NS_IMETHOD FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval) = 0; 124 125 /** 126 * Find a certificate by email address. 127 * 128 * @param aToken Optionally limits the scope of 129 * this function to a token device. 130 * Can be null to mean any token. 131 * @param aEmailAddress The email address to be used as the key 132 * to find the certificate. 133 * 134 * @return The matching certificate if found. 135 */ 136 /* nsIX509Cert findCertByEmailAddress (in nsISupports aToken, in string aEmailAddress); */ 137 NS_SCRIPTABLE NS_IMETHOD FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval) = 0; 138 139 /** 140 * Use this to import a stream sent down as a mime type into 141 * the certificate database on the default token. 142 * The stream may consist of one or more certificates. 143 * 144 * @param data The raw data to be imported 145 * @param length The length of the data to be imported 146 * @param type The type of the certificate, see constants in nsIX509Cert 147 * @param ctx A UI context. 148 */ 149 /* void importCertificates ([array, size_is (length)] in octet data, in unsigned long length, in unsigned long type, in nsIInterfaceRequestor ctx); */ 150 NS_SCRIPTABLE NS_IMETHOD ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) = 0; 151 152 /** 153 * Import another person's email certificate into the database. 154 * 155 * @param data The raw data to be imported 156 * @param length The length of the data to be imported 157 * @param ctx A UI context. 158 */ 159 /* void importEmailCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ 160 NS_SCRIPTABLE NS_IMETHOD ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) = 0; 161 162 /** 163 * Import a server machine's certificate into the database. 164 * 165 * @param data The raw data to be imported 166 * @param length The length of the data to be imported 167 * @param ctx A UI context. 168 */ 169 /* void importServerCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ 170 NS_SCRIPTABLE NS_IMETHOD ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) = 0; 171 172 /** 173 * Import a personal certificate into the database, assuming 174 * the database already contains the private key for this certificate. 175 * 176 * @param data The raw data to be imported 177 * @param length The length of the data to be imported 178 * @param ctx A UI context. 179 */ 180 /* void importUserCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ 181 NS_SCRIPTABLE NS_IMETHOD ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) = 0; 182 183 /** 184 * Delete a certificate stored in the database. 185 * 186 * @param aCert Delete this certificate. 187 */ 188 /* void deleteCertificate (in nsIX509Cert aCert); */ 189 NS_SCRIPTABLE NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) = 0; 190 191 /** 192 * Modify the trust that is stored and associated to a certificate within 193 * a database. Separate trust is stored for 194 * One call manipulates the trust for one trust type only. 195 * See the trust type constants defined within this interface. 196 * 197 * @param cert Change the stored trust of this certificate. 198 * @param type The type of the certificate. See nsIX509Cert. 199 * @param trust A bitmask. The new trust for the possible usages. 200 * See the trust constants defined within this interface. 201 */ 202 /* void setCertTrust (in nsIX509Cert cert, in unsigned long type, in unsigned long trust); */ 203 NS_SCRIPTABLE NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) = 0; 204 205 /** 206 * Query whether a certificate is trusted for a particular use. 207 * 208 * @param cert Obtain the stored trust of this certificate. 209 * @param certType The type of the certificate. See nsIX509Cert. 210 * @param trustType A single bit from the usages constants defined 211 * within this interface. 212 * 213 * @return Returns true if the certificate is trusted for the given use. 214 */ 215 /* boolean isCertTrusted (in nsIX509Cert cert, in unsigned long certType, in unsigned long trustType); */ 216 NS_SCRIPTABLE NS_IMETHOD IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) = 0; 217 218 /** 219 * Import certificate(s) from file 220 * 221 * @param aToken Optionally limits the scope of 222 * this function to a token device. 223 * Can be null to mean any token. 224 * @param aFile Identifies a file that contains the certificate 225 * to be imported. 226 * @param aType Describes the type of certificate that is going to 227 * be imported. See type constants in nsIX509Cert. 228 */ 229 /* void importCertsFromFile (in nsISupports aToken, in nsILocalFile aFile, in unsigned long aType); */ 230 NS_SCRIPTABLE NS_IMETHOD ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType) = 0; 231 232 /** 233 * Import a PKCS#12 file containing cert(s) and key(s) into the database. 234 * 235 * @param aToken Optionally limits the scope of 236 * this function to a token device. 237 * Can be null to mean any token. 238 * @param aFile Identifies a file that contains the data 239 * to be imported. 240 */ 241 /* void importPKCS12File (in nsISupports aToken, in nsILocalFile aFile); */ 242 NS_SCRIPTABLE NS_IMETHOD ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile) = 0; 243 244 /** 245 * Export a set of certs and keys from the database to a PKCS#12 file. 246 * 247 * @param aToken Optionally limits the scope of 248 * this function to a token device. 249 * Can be null to mean any token. 250 * @param aFile Identifies a file that will be filled with the data 251 * to be exported. 252 * @param count The number of certificates to be exported. 253 * @param aCerts The array of all certificates to be exported. 254 */ 255 /* void exportPKCS12File (in nsISupports aToken, in nsILocalFile aFile, in unsigned long count, [array, size_is (count)] in nsIX509Cert aCerts); */ 256 NS_SCRIPTABLE NS_IMETHOD ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) = 0; 257 258 /** 259 * An array of all known OCSP responders within the scope of the 260 * certificate database. 261 * 262 * @return Array of OCSP responders, entries are QIable to nsIOCSPResponder. 263 */ 264 /* nsIArray getOCSPResponders (); */ 265 NS_SCRIPTABLE NS_IMETHOD GetOCSPResponders(nsIArray **_retval) = 0; 266 267 /** 268 * Whether OCSP is enabled in preferences. 269 */ 270 /* readonly attribute boolean isOcspOn; */ 271 NS_SCRIPTABLE NS_IMETHOD GetIsOcspOn(PRBool *aIsOcspOn) = 0; 272 273 /* nsIX509Cert constructX509FromBase64 (in string base64); */ 274 NS_SCRIPTABLE NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) = 0; 275 276}; 277 278 NS_DEFINE_STATIC_IID_ACCESSOR(nsIX509CertDB, NS_IX509CERTDB_IID) 279 280/* Use this macro when declaring classes that implement this interface. */ 281#define NS_DECL_NSIX509CERTDB \ 282 NS_SCRIPTABLE NS_IMETHOD FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval); \ 283 NS_SCRIPTABLE NS_IMETHOD FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval); \ 284 NS_SCRIPTABLE NS_IMETHOD FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList); \ 285 NS_SCRIPTABLE NS_IMETHOD FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval); \ 286 NS_SCRIPTABLE NS_IMETHOD FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval); \ 287 NS_SCRIPTABLE NS_IMETHOD FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval); \ 288 NS_SCRIPTABLE NS_IMETHOD ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx); \ 289 NS_SCRIPTABLE NS_IMETHOD ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx); \ 290 NS_SCRIPTABLE NS_IMETHOD ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx); \ 291 NS_SCRIPTABLE NS_IMETHOD ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx); \ 292 NS_SCRIPTABLE NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert); \ 293 NS_SCRIPTABLE NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust); \ 294 NS_SCRIPTABLE NS_IMETHOD IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval); \ 295 NS_SCRIPTABLE NS_IMETHOD ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType); \ 296 NS_SCRIPTABLE NS_IMETHOD ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile); \ 297 NS_SCRIPTABLE NS_IMETHOD ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts); \ 298 NS_SCRIPTABLE NS_IMETHOD GetOCSPResponders(nsIArray **_retval); \ 299 NS_SCRIPTABLE NS_IMETHOD GetIsOcspOn(PRBool *aIsOcspOn); \ 300 NS_SCRIPTABLE NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval); 301 302/* Use this macro to declare functions that forward the behavior of this interface to another object. */ 303#define NS_FORWARD_NSIX509CERTDB(_to) \ 304 NS_SCRIPTABLE NS_IMETHOD FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval) { return _to FindCertByNickname(aToken, aNickname, _retval); } \ 305 NS_SCRIPTABLE NS_IMETHOD FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval) { return _to FindCertByDBKey(aDBkey, aToken, _retval); } \ 306 NS_SCRIPTABLE NS_IMETHOD FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) { return _to FindCertNicknames(aToken, aType, count, certNameList); } \ 307 NS_SCRIPTABLE NS_IMETHOD FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval) { return _to FindEmailEncryptionCert(aNickname, _retval); } \ 308 NS_SCRIPTABLE NS_IMETHOD FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval) { return _to FindEmailSigningCert(aNickname, _retval); } \ 309 NS_SCRIPTABLE NS_IMETHOD FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval) { return _to FindCertByEmailAddress(aToken, aEmailAddress, _retval); } \ 310 NS_SCRIPTABLE NS_IMETHOD ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) { return _to ImportCertificates(data, length, type, ctx); } \ 311 NS_SCRIPTABLE NS_IMETHOD ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return _to ImportEmailCertificate(data, length, ctx); } \ 312 NS_SCRIPTABLE NS_IMETHOD ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return _to ImportServerCertificate(data, length, ctx); } \ 313 NS_SCRIPTABLE NS_IMETHOD ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return _to ImportUserCertificate(data, length, ctx); } \ 314 NS_SCRIPTABLE NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) { return _to DeleteCertificate(aCert); } \ 315 NS_SCRIPTABLE NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) { return _to SetCertTrust(cert, type, trust); } \ 316 NS_SCRIPTABLE NS_IMETHOD IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) { return _to IsCertTrusted(cert, certType, trustType, _retval); } \ 317 NS_SCRIPTABLE NS_IMETHOD ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType) { return _to ImportCertsFromFile(aToken, aFile, aType); } \ 318 NS_SCRIPTABLE NS_IMETHOD ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile) { return _to ImportPKCS12File(aToken, aFile); } \ 319 NS_SCRIPTABLE NS_IMETHOD ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) { return _to ExportPKCS12File(aToken, aFile, count, aCerts); } \ 320 NS_SCRIPTABLE NS_IMETHOD GetOCSPResponders(nsIArray **_retval) { return _to GetOCSPResponders(_retval); } \ 321 NS_SCRIPTABLE NS_IMETHOD GetIsOcspOn(PRBool *aIsOcspOn) { return _to GetIsOcspOn(aIsOcspOn); } \ 322 NS_SCRIPTABLE NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) { return _to ConstructX509FromBase64(base64, _retval); } 323 324/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ 325#define NS_FORWARD_SAFE_NSIX509CERTDB(_to) \ 326 NS_SCRIPTABLE NS_IMETHOD FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCertByNickname(aToken, aNickname, _retval); } \ 327 NS_SCRIPTABLE NS_IMETHOD FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCertByDBKey(aDBkey, aToken, _retval); } \ 328 NS_SCRIPTABLE NS_IMETHOD FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCertNicknames(aToken, aType, count, certNameList); } \ 329 NS_SCRIPTABLE NS_IMETHOD FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindEmailEncryptionCert(aNickname, _retval); } \ 330 NS_SCRIPTABLE NS_IMETHOD FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindEmailSigningCert(aNickname, _retval); } \ 331 NS_SCRIPTABLE NS_IMETHOD FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCertByEmailAddress(aToken, aEmailAddress, _retval); } \ 332 NS_SCRIPTABLE NS_IMETHOD ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportCertificates(data, length, type, ctx); } \ 333 NS_SCRIPTABLE NS_IMETHOD ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportEmailCertificate(data, length, ctx); } \ 334 NS_SCRIPTABLE NS_IMETHOD ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportServerCertificate(data, length, ctx); } \ 335 NS_SCRIPTABLE NS_IMETHOD ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportUserCertificate(data, length, ctx); } \ 336 NS_SCRIPTABLE NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCertificate(aCert); } \ 337 NS_SCRIPTABLE NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCertTrust(cert, type, trust); } \ 338 NS_SCRIPTABLE NS_IMETHOD IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCertTrusted(cert, certType, trustType, _retval); } \ 339 NS_SCRIPTABLE NS_IMETHOD ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportCertsFromFile(aToken, aFile, aType); } \ 340 NS_SCRIPTABLE NS_IMETHOD ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportPKCS12File(aToken, aFile); } \ 341 NS_SCRIPTABLE NS_IMETHOD ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExportPKCS12File(aToken, aFile, count, aCerts); } \ 342 NS_SCRIPTABLE NS_IMETHOD GetOCSPResponders(nsIArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOCSPResponders(_retval); } \ 343 NS_SCRIPTABLE NS_IMETHOD GetIsOcspOn(PRBool *aIsOcspOn) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsOcspOn(aIsOcspOn); } \ 344 NS_SCRIPTABLE NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConstructX509FromBase64(base64, _retval); } 345 346#if 0 347/* Use the code below as a template for the implementation class for this interface. */ 348 349/* Header file */ 350class nsX509CertDB : public nsIX509CertDB 351{ 352public: 353 NS_DECL_ISUPPORTS 354 NS_DECL_NSIX509CERTDB 355 356 nsX509CertDB(); 357 358private: 359 ~nsX509CertDB(); 360 361protected: 362 /* additional members */ 363}; 364 365/* Implementation file */ 366NS_IMPL_ISUPPORTS1(nsX509CertDB, nsIX509CertDB) 367 368nsX509CertDB::nsX509CertDB() 369{ 370 /* member initializers and constructor code */ 371} 372 373nsX509CertDB::~nsX509CertDB() 374{ 375 /* destructor code */ 376} 377 378/* nsIX509Cert findCertByNickname (in nsISupports aToken, in AString aNickname); */ 379NS_IMETHODIMP nsX509CertDB::FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval) 380{ 381 return NS_ERROR_NOT_IMPLEMENTED; 382} 383 384/* nsIX509Cert findCertByDBKey (in string aDBkey, in nsISupports aToken); */ 385NS_IMETHODIMP nsX509CertDB::FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval) 386{ 387 return NS_ERROR_NOT_IMPLEMENTED; 388} 389 390/* void findCertNicknames (in nsISupports aToken, in unsigned long aType, out unsigned long count, [array, size_is (count)] out wstring certNameList); */ 391NS_IMETHODIMP nsX509CertDB::FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) 392{ 393 return NS_ERROR_NOT_IMPLEMENTED; 394} 395 396/* nsIX509Cert findEmailEncryptionCert (in AString aNickname); */ 397NS_IMETHODIMP nsX509CertDB::FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval) 398{ 399 return NS_ERROR_NOT_IMPLEMENTED; 400} 401 402/* nsIX509Cert findEmailSigningCert (in AString aNickname); */ 403NS_IMETHODIMP nsX509CertDB::FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval) 404{ 405 return NS_ERROR_NOT_IMPLEMENTED; 406} 407 408/* nsIX509Cert findCertByEmailAddress (in nsISupports aToken, in string aEmailAddress); */ 409NS_IMETHODIMP nsX509CertDB::FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval) 410{ 411 return NS_ERROR_NOT_IMPLEMENTED; 412} 413 414/* void importCertificates ([array, size_is (length)] in octet data, in unsigned long length, in unsigned long type, in nsIInterfaceRequestor ctx); */ 415NS_IMETHODIMP nsX509CertDB::ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) 416{ 417 return NS_ERROR_NOT_IMPLEMENTED; 418} 419 420/* void importEmailCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ 421NS_IMETHODIMP nsX509CertDB::ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) 422{ 423 return NS_ERROR_NOT_IMPLEMENTED; 424} 425 426/* void importServerCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ 427NS_IMETHODIMP nsX509CertDB::ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) 428{ 429 return NS_ERROR_NOT_IMPLEMENTED; 430} 431 432/* void importUserCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ 433NS_IMETHODIMP nsX509CertDB::ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) 434{ 435 return NS_ERROR_NOT_IMPLEMENTED; 436} 437 438/* void deleteCertificate (in nsIX509Cert aCert); */ 439NS_IMETHODIMP nsX509CertDB::DeleteCertificate(nsIX509Cert *aCert) 440{ 441 return NS_ERROR_NOT_IMPLEMENTED; 442} 443 444/* void setCertTrust (in nsIX509Cert cert, in unsigned long type, in unsigned long trust); */ 445NS_IMETHODIMP nsX509CertDB::SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) 446{ 447 return NS_ERROR_NOT_IMPLEMENTED; 448} 449 450/* boolean isCertTrusted (in nsIX509Cert cert, in unsigned long certType, in unsigned long trustType); */ 451NS_IMETHODIMP nsX509CertDB::IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) 452{ 453 return NS_ERROR_NOT_IMPLEMENTED; 454} 455 456/* void importCertsFromFile (in nsISupports aToken, in nsILocalFile aFile, in unsigned long aType); */ 457NS_IMETHODIMP nsX509CertDB::ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType) 458{ 459 return NS_ERROR_NOT_IMPLEMENTED; 460} 461 462/* void importPKCS12File (in nsISupports aToken, in nsILocalFile aFile); */ 463NS_IMETHODIMP nsX509CertDB::ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile) 464{ 465 return NS_ERROR_NOT_IMPLEMENTED; 466} 467 468/* void exportPKCS12File (in nsISupports aToken, in nsILocalFile aFile, in unsigned long count, [array, size_is (count)] in nsIX509Cert aCerts); */ 469NS_IMETHODIMP nsX509CertDB::ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) 470{ 471 return NS_ERROR_NOT_IMPLEMENTED; 472} 473 474/* nsIArray getOCSPResponders (); */ 475NS_IMETHODIMP nsX509CertDB::GetOCSPResponders(nsIArray **_retval) 476{ 477 return NS_ERROR_NOT_IMPLEMENTED; 478} 479 480/* readonly attribute boolean isOcspOn; */ 481NS_IMETHODIMP nsX509CertDB::GetIsOcspOn(PRBool *aIsOcspOn) 482{ 483 return NS_ERROR_NOT_IMPLEMENTED; 484} 485 486/* nsIX509Cert constructX509FromBase64 (in string base64); */ 487NS_IMETHODIMP nsX509CertDB::ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) 488{ 489 return NS_ERROR_NOT_IMPLEMENTED; 490} 491 492/* End of implementation class template. */ 493#endif 494 495 496#endif /* __gen_nsIX509CertDB_h__ */