static SslInitializer() { CryptoInitializer.Initialize(); //Call ssl specific initializer Ssl.EnsureLibSslInitialized(); }
static SslInitializer() { CryptoInitializer.Initialize(); //Call ssl specific initializer SSL_library_init(); SSL_load_error_strings(); }
static HttpInitializer() { // CURL uses OpenSSL which me must initialize first to guarantee thread-safety CryptoInitializer.Initialize(); if (EnsureCurlIsInitialized() != 0) { throw new InvalidOperationException(); } }
static SslInitializer() { CryptoInitializer.Initialize(); //Call ssl specific initializer Ssl.EnsureLibSslInitialized(); if (Interop.Crypto.ErrPeekLastError() != 0) { // It is going to be wrapped in a type load exception but will have the error information throw Interop.Crypto.CreateOpenSslCryptographicException(); } }
static HttpInitializer() { #if !SYSNETHTTP_NO_OPENSSL // CURL uses OpenSSL which me must initialize first to guarantee thread-safety CryptoInitializer.Initialize(); #endif if (EnsureCurlIsInitialized() != 0) { throw new InvalidOperationException(); } }
public IEnumerator InitCrypto() { UseWebSocket?useWebSocket = this.useWebSocket; if (useWebSocket.HasValue) { Logger.Warn("InitCrypto method not supported in WebSocket mode; use WSS protocol instead"); return(null); } CryptoInitializer cryptoInitializer = new CryptoInitializer(this); return(cryptoInitializer.Run()); }
static HttpInitializer() { #if !SYSNETHTTP_NO_OPENSSL string opensslVersion = Interop.Http.GetSslVersionDescription(); if (string.IsNullOrEmpty(opensslVersion) || opensslVersion.IndexOf(Interop.Http.OpenSsl10Description, StringComparison.OrdinalIgnoreCase) != -1) { // CURL uses OpenSSL which me must initialize first to guarantee thread-safety // Only initialize for OpenSSL/1.0, any newer versions may have mismatched // pointers, resulting in segfaults. CryptoInitializer.Initialize(); } #endif if (EnsureCurlIsInitialized() != 0) { throw new InvalidOperationException(); } }
static HttpInitializer() { #if !SYSNETHTTP_NO_OPENSSL string opensslVersion = Interop.Http.GetSslVersionDescription(); if (string.IsNullOrEmpty(opensslVersion) || opensslVersion.IndexOf(Interop.Http.OpenSslDescriptionPrefix, StringComparison.OrdinalIgnoreCase) != -1) { // CURL uses OpenSSL which we must initialize first to guarantee thread-safety. // We'll wake up whatever OpenSSL we're going to run against, but might later determine that // they aren't compatible. CryptoInitializer.Initialize(); } #endif if (EnsureCurlIsInitialized() != 0) { throw new InvalidOperationException(); } }
static Crypto() { CryptoInitializer.Initialize(); }
static OpenSsl() { CryptoInitializer.Initialize(); }
static libcrypto() { CryptoInitializer.Initialize(); }
/// <summary> /// Initializes the key manager using the specified key. A new key can be generated by calling <seealso cref="GenerateKey"/>. /// </summary> public KeyMan(string key) { _cryptoServiceProvider = CryptoInitializer.GetFromKey(key); }
/// <summary> /// Generates a new key, which includes both public and private keys /// </summary> public static string GenerateKey() { return(CryptoInitializer.GenerateNewKey()); }
/// <summary> /// Generates a new key, which includes both public and private keys /// </summary> public static string GenerateKey() => CryptoInitializer.GenerateNewKey();