00001 00002 #include <string> 00003 00004 namespace AuthN { 00005 00010 bool nssInit(const std::string& configdir); 00011 00012 bool nssExportCertificate(const std::string& certname, const std::string& certfile); 00013 00014 bool nssOutputPKCS12(const std::string certname, char* outfile, char* slotpw, char* p12pw); 00015 00016 bool nssGenerateCSR(const std::string& privkey_name, const std::string& dn, const char* slotpw, const std::string& outfile, std::string& privk_str, bool ascii = true); 00017 00018 bool nssCreateCert(const std::string& csrfile, const std::string& issuername, const char* passwd, const int duration, std::string& outfile, bool ascii = true); 00019 00020 bool nssImportCertAndPrivateKey(char* slotpw, const std::string& keyfile, const std::string& keyname, const std::string& certfile, const std::string& certname, const char* trusts = NULL, bool ascii = true); 00021 00022 bool nssImportCert(char* slotpw, const std::string& certfile, const std::string& name, const char* trusts = NULL, bool ascii = true); 00023 }