Imported Upstream version 5.18.0.142

Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-09 08:20:59 +00:00
parent e52655b4dc
commit 0abdbe5a7d
1547 changed files with 93792 additions and 47893 deletions

View File

@ -26,6 +26,7 @@
#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.Threading;
using System.Security.Cryptography;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
@ -90,11 +91,10 @@ namespace Mono.Btls
{
if (!ok) {
if (callerName != null)
throw new MonoBtlsException ("{0}.{1} failed.", GetType ().Name, callerName);
throw new CryptographicException ($"`{GetType ().Name}.{callerName}` failed.");
else
throw new MonoBtlsException ();
throw new CryptographicException ();
}
}
protected void CheckError (int ret, [CallerMemberName] string callerName = null)
@ -110,10 +110,10 @@ namespace Mono.Btls
string message;
if (callerName != null)
message = string.Format ("Caught unhandled exception in {0}.{1}.", GetType ().Name, callerName);
message = $"Caught unhandled exception in `{GetType ().Name}.{callerName}`.";
else
message = string.Format ("Caught unhandled exception.");
throw new MonoBtlsException (message, error);
message = "Caught unhandled exception.";
throw new CryptographicException (message, error);
}
[DllImport (BTLS_DYLIB)]