You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
@ -1102,29 +1102,64 @@ namespace Mono.Net.Security
|
||||
}
|
||||
}
|
||||
|
||||
#region Need to Implement
|
||||
public int CipherStrength {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
CheckThrow (true);
|
||||
var info = GetConnectionInfo ();
|
||||
if (info == null)
|
||||
return 0;
|
||||
switch (info.CipherAlgorithmType) {
|
||||
case MSI.CipherAlgorithmType.None:
|
||||
case MSI.CipherAlgorithmType.Aes128:
|
||||
case MSI.CipherAlgorithmType.AesGcm128:
|
||||
return 128;
|
||||
case MSI.CipherAlgorithmType.Aes256:
|
||||
case MSI.CipherAlgorithmType.AesGcm256:
|
||||
return 256;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException (nameof (info.CipherAlgorithmType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int HashStrength {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
CheckThrow (true);
|
||||
var info = GetConnectionInfo ();
|
||||
if (info == null)
|
||||
return 0;
|
||||
switch (info.HashAlgorithmType) {
|
||||
case MSI.HashAlgorithmType.Md5:
|
||||
case MSI.HashAlgorithmType.Md5Sha1:
|
||||
return 128;
|
||||
case MSI.HashAlgorithmType.Sha1:
|
||||
return 160;
|
||||
case MSI.HashAlgorithmType.Sha224:
|
||||
return 224;
|
||||
case MSI.HashAlgorithmType.Sha256:
|
||||
return 256;
|
||||
case MSI.HashAlgorithmType.Sha384:
|
||||
return 384;
|
||||
case MSI.HashAlgorithmType.Sha512:
|
||||
return 512;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException (nameof (info.HashAlgorithmType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int KeyExchangeStrength {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
// FIXME: CoreFX returns 0 on non-Windows platforms.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CheckCertRevocationStatus {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -156,7 +156,7 @@ namespace Mono.Net.Security
|
||||
get;
|
||||
}
|
||||
|
||||
public abstract X509Certificate RemoteCertificate {
|
||||
public abstract X509Certificate2 RemoteCertificate {
|
||||
get;
|
||||
}
|
||||
|
||||
@ -174,13 +174,13 @@ namespace Mono.Net.Security
|
||||
|
||||
public abstract bool PendingRenegotiation ();
|
||||
|
||||
protected bool ValidateCertificate (X509Certificate leaf, X509Chain chain)
|
||||
protected bool ValidateCertificate (X509Certificate2 leaf, X509Chain chain)
|
||||
{
|
||||
var result = certificateValidator.ValidateCertificate (TargetHost, IsServer, leaf, chain);
|
||||
return result != null && result.Trusted && !result.UserDenied;
|
||||
}
|
||||
|
||||
protected bool ValidateCertificate (X509CertificateCollection certificates)
|
||||
protected bool ValidateCertificate (X509Certificate2Collection certificates)
|
||||
{
|
||||
var result = certificateValidator.ValidateCertificate (TargetHost, IsServer, certificates);
|
||||
return result != null && result.Trusted && !result.UserDenied;
|
||||
|
Reference in New Issue
Block a user