summaryrefslogtreecommitdiff
path: root/remote.go
diff options
context:
space:
mode:
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/remote.go b/remote.go
index 3a435d1..275d4d9 100644
--- a/remote.go
+++ b/remote.go
@@ -17,6 +17,8 @@ import (
"strings"
"sync"
"unsafe"
+
+ "golang.org/x/crypto/ssh"
)
// RemoteCreateOptionsFlag is Remote creation options flags
@@ -257,21 +259,25 @@ type Certificate struct {
Hostkey HostkeyCertificate
}
+// HostkeyKind is a bitmask of the available hashes in HostkeyCertificate.
type HostkeyKind uint
const (
HostkeyMD5 HostkeyKind = C.GIT_CERT_SSH_MD5
HostkeySHA1 HostkeyKind = C.GIT_CERT_SSH_SHA1
HostkeySHA256 HostkeyKind = C.GIT_CERT_SSH_SHA256
+ HostkeyRaw HostkeyKind = 1 << 3
)
// Server host key information. A bitmask containing the available fields.
-// Check for combinations of: HostkeyMD5, HostkeySHA1, HostkeySHA256.
+// Check for combinations of: HostkeyMD5, HostkeySHA1, HostkeySHA256, HostkeyRaw.
type HostkeyCertificate struct {
- Kind HostkeyKind
- HashMD5 [16]byte
- HashSHA1 [20]byte
- HashSHA256 [32]byte
+ Kind HostkeyKind
+ HashMD5 [16]byte
+ HashSHA1 [20]byte
+ HashSHA256 [32]byte
+ Hostkey []byte
+ SSHPublicKey ssh.PublicKey
}
type PushOptions struct {