index.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2015 Joyent, Inc.
  2. var Key = require('./key');
  3. var Fingerprint = require('./fingerprint');
  4. var Signature = require('./signature');
  5. var PrivateKey = require('./private-key');
  6. var Certificate = require('./certificate');
  7. var Identity = require('./identity');
  8. var errs = require('./errors');
  9. module.exports = {
  10. /* top-level classes */
  11. Key: Key,
  12. parseKey: Key.parse,
  13. Fingerprint: Fingerprint,
  14. parseFingerprint: Fingerprint.parse,
  15. Signature: Signature,
  16. parseSignature: Signature.parse,
  17. PrivateKey: PrivateKey,
  18. parsePrivateKey: PrivateKey.parse,
  19. generatePrivateKey: PrivateKey.generate,
  20. Certificate: Certificate,
  21. parseCertificate: Certificate.parse,
  22. createSelfSignedCertificate: Certificate.createSelfSigned,
  23. createCertificate: Certificate.create,
  24. Identity: Identity,
  25. identityFromDN: Identity.parseDN,
  26. identityForHost: Identity.forHost,
  27. identityForUser: Identity.forUser,
  28. identityForEmail: Identity.forEmail,
  29. /* errors */
  30. FingerprintFormatError: errs.FingerprintFormatError,
  31. InvalidAlgorithmError: errs.InvalidAlgorithmError,
  32. KeyParseError: errs.KeyParseError,
  33. SignatureParseError: errs.SignatureParseError,
  34. KeyEncryptedError: errs.KeyEncryptedError,
  35. CertificateParseError: errs.CertificateParseError
  36. };