File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -35,32 +35,22 @@ protected CertificateSsh()
3535 /// </summary>
3636 public readonly bool HasSHA1 ;
3737
38- /// <summary>
39- /// True if we have the SHA1 hostkey hash from the server
40- /// </summary>public readonly bool HasSHA1;
41-
4238 internal unsafe CertificateSsh ( git_certificate_ssh * cert )
4339 {
4440
4541 HasMD5 = cert ->type . HasFlag ( GitCertificateSshType . MD5 ) ;
4642 HasSHA1 = cert ->type . HasFlag ( GitCertificateSshType . SHA1 ) ;
4743
4844 HashMD5 = new byte [ 16 ] ;
49- fixed ( byte * p = & HashMD5 [ 0 ] )
45+ for ( var i = 0 ; i < HashMD5 . Length ; i ++ )
5046 {
51- for ( var i = 0 ; i < HashMD5 . Length ; i ++ )
52- {
53- HashMD5 [ i ] = p [ i ] ;
54- }
47+ HashMD5 [ i ] = cert ->HashMD5 [ i ] ;
5548 }
5649
5750 HashSHA1 = new byte [ 20 ] ;
58- fixed ( byte * p = & HashSHA1 [ 0 ] )
51+ for ( var i = 0 ; i < HashSHA1 . Length ; i ++ )
5952 {
60- for ( var i = 0 ; i < HashSHA1 . Length ; i ++ )
61- {
62- HashSHA1 [ i ] = p [ i ] ;
63- }
53+ HashSHA1 [ i ] = cert ->HashSHA1 [ i ] ;
6454 }
6555 }
6656
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ internal unsafe struct git_certificate_ssh
1414 public unsafe fixed byte HashMD5 [ 16 ] ;
1515
1616 /// <summary>
17- /// The MD5 hash (if appropriate)
17+ /// The SHA1 hash (if appropriate)
1818 /// </summary>
1919 public unsafe fixed byte HashSHA1 [ 20 ] ;
2020 }
You can’t perform that action at this time.
0 commit comments