Skip to content

Commit 5cc52b5

Browse files
committed
fixup! Allow the caller to inspect the host's certificate
1 parent 6deae11 commit 5cc52b5

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

LibGit2Sharp.Tests/CloneFixture.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ public void CanInspectCertificateOnClone(string url, string hostname, Type certT
256256
{
257257
CertificateCheck = (cert, valid, host) =>
258258
{
259+
wasCalled = true;
260+
259261
Assert.Equal(hostname, host);
260262
Assert.Equal(certType, cert.GetType());
261263

LibGit2Sharp/Core/GitCertificateType.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,25 @@
55
/// </summary>
66
internal enum GitCertificateType
77
{
8+
/// <summary>
9+
/// No information about the certificate is available.
10+
/// </summary>
11+
None = 0,
12+
813
/// <summary>
914
/// The certificate is a x509 certificate
1015
/// </summary>
11-
X509 = 0,
16+
X509 = 1,
17+
1218
/// <summary>
1319
/// The "certificate" is in fact a hostkey identification for ssh.
1420
/// </summary>
15-
Hostkey = 1,
21+
Hostkey = 2,
22+
23+
/// <summary>
24+
/// The "certificate" is in fact a collection of `name:content` strings
25+
/// containing information about the certificate.
26+
/// </summary>
27+
StrArray = 3,
1628
}
1729
}

0 commit comments

Comments
 (0)