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. Certificate: Certificate,
  20. parseCertificate: Certificate.parse,
  21. createSelfSignedCertificate: Certificate.createSelfSigned,
  22. createCertificate: Certificate.create,
  23. Identity: Identity,
  24. identityFromDN: Identity.parseDN,
  25. identityForHost: Identity.forHost,
  26. identityForUser: Identity.forUser,
  27. identityForEmail: Identity.forEmail,
  28. /* errors */
  29. FingerprintFormatError: errs.FingerprintFormatError,
  30. InvalidAlgorithmError: errs.InvalidAlgorithmError,
  31. KeyParseError: errs.KeyParseError,
  32. SignatureParseError: errs.SignatureParseError,
  33. KeyEncryptedError: errs.KeyEncryptedError,
  34. CertificateParseError: errs.CertificateParseError
  35. };