本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 satır
1.1KB

  1. package ssh
  2. import gossh "golang.org/x/crypto/ssh"
  3. // PublicKey is an abstraction of different types of public keys.
  4. type PublicKey interface {
  5. gossh.PublicKey
  6. }
  7. // The Permissions type holds fine-grained permissions that are specific to a
  8. // user or a specific authentication method for a user. Permissions, except for
  9. // "source-address", must be enforced in the server application layer, after
  10. // successful authentication.
  11. type Permissions struct {
  12. *gossh.Permissions
  13. }
  14. // A Signer can create signatures that verify against a public key.
  15. type Signer interface {
  16. gossh.Signer
  17. }
  18. // ParseAuthorizedKey parses a public key from an authorized_keys file used in
  19. // OpenSSH according to the sshd(8) manual page.
  20. func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []string, rest []byte, err error) {
  21. return gossh.ParseAuthorizedKey(in)
  22. }
  23. // ParsePublicKey parses an SSH public key formatted for use in
  24. // the SSH wire protocol according to RFC 4253, section 6.6.
  25. func ParsePublicKey(in []byte) (out PublicKey, err error) {
  26. return gossh.ParsePublicKey(in)
  27. }
上海开阖软件有限公司 沪ICP备12045867号-1