nsIX509CertDB.h 24 KB

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