Error an unknown error occurred while processing the certificate

Fixes a problem that occurs when you access an application that is hosted on an Apache web server.

Symptoms

When you access an application that is hosted on an Apache web server through Microsoft Forefront Unified Access Gateway 2010, you may receive the following error message:

An unknown error occurred while processing the certificate.


Note This problem occurs only if the connection from Forefront Unified Access Gateway to the Apache server is made over HTTPS.

Cause

This problem can occur if the web server returns a response that includes no content-length header but instead includes a «Connection:close» header and ends the TCP connection to signify the end of the response. Schannel decrypts the message and returns SEC_I_CONTEXT_EXPIRED to Forefront Unified Access Gateway to indicate that the sender closed the connection. However, Forefront Unified Access Gateway mistakenly interprets this as an error condition.

Resolution

This problem is fixed in Rollup 1 for Forefront Unified Access Gateway 2010 Service Pack 4.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

More Information

You can see this problem in the following Forefront Unified Access Gateway tracing:

[whlfilter CExtECB::OnRecvSrvrDataCompleted WhlExt2IWS.cpp@3301]
Info:Response from RWS to filter (ExtECB=00000000136ABA70), (PFC=000000000CBAB2D8) —[HTTP/1.1 200 OK
Pragma: No-cache
Cache-Control: no-cache
Expires: datetime
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-3.2.6 (build: CVSTag=JBoss_3_2_6 date=date)
Content-Type: text/html;charset=UTF-8
Content-Encoding: gzip
Vary: Accept-Encoding
Date: date time GMT
Server: Apache-Coyote/1.1
Connection: close
[sslbox SSLMachine::HandleDecryptMessageError SSLMachine.cpp@753] ERROR:SSLMachine::Read(): DecryptMessage failed (SEC_I_CONTEXT_EXPIRED) Error: 997

References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

I have a self-signed certificate and i would like to use it on my websockets server to handle requests from wss://localhost:443. I connect to the server from any web-browser.

However, i cant seem to get the authentication right. Everytime i try to connect to the WebSockets Server via Advanced Rest Client (ARC) software, i type wss://localhost:443 or wss://127.0.0.1:443,

Am getting the exception

«System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. —> System.ComponentModel.Win32Exception: An unknown error occurred while processing the certificate«.

I created the certificate using openssl for windows and created a very simple certificate. Still i cant get the authentication right. Any help?

Here is how am trying to go about it with the C# code


var serverCertificate = new X509Certificate2("E:\TestsFolder\test-cert.pfx", "12345");
var certificates = new X509CertificateCollection { serverCertificate };

Stream stream = tcpClient.GetStream();

SslStream sslStream = new SslStream(stream, false,
                    (o, x509Certificate, chain, errors) => true,
                    (o, s, collection, x509Certificate, issuers) => certificates[0]);

await sslStream.AuthenticateAsServerAsync(serverCertificate, false, SslProtocols.Tls12, false);

WebSocketHttpContext context = await _webSocketServerFactory.ReadHttpHeaderFromStreamAsync(sslStream, source.Token);

What on earth could i be missing?

Here is a shot of my console with the exception

enter image description here

  • Remove From My Forums
  • Question

  • ISA 2006 SP1 ENT Windows 2003 Std SP2 in our DMZ.

    We have a rule that bridges SSL to port 10000.  The web server layer is requesting client certificate authentication.  ISA is delegating authentication to the web server.  When I attempt to access the site, I am getting the error documented in the subject line.  The exact verbage is:

    Error Code: 500 Internal Server Error.  An unknown error occurred while processing the certificate. (-2146893017). 

    Any suggestions?

Answers

    • Marked as answer by

      Tuesday, April 6, 2010 3:55 AM

  • Remove From My Forums
  • Question

  • User-991207367 posted

    We are having some difficulty in accessing web services using certificates. Here is the error: 

    [Win32Exception (0x80004005): An unknown error occurred while processing the certificate]

    [WebException: The underlying connection was closed: Could not establish secure channel for SSL/TLS.]

    we are using .net framework 1.1 on windows server 2003. Searched in so many forums but none of them resolved the problem!

    Any idea guys?

Answers

  • User1071970124 posted

    So, were you embarassed to say you’re not an IT person? You should have said that from the start! I’m answering your question as though you were an IT person, with some clue about what you’re doing! If you don’t, then you need to say so!

    In fact, please say, right now, what your background is. The assistance you are given here will vary greatly depending on whether you are fresh out of High School, or have a Graduate degree in a non-technical subject, or whether you have a background in
    a Physical Science.

    My answer is still similar: given your lack of experience, you will not be able to distinguish among the many search hits you’ll find. How will you know which one makes sense?

    The problem is that there’s not a «question» and an «answer». You’ve reported a symptom. It will require diagnosis to determine what the disease is, and to prescribe treatment. The error message itself says so: «an unknown error». That means that someone’s
    going to have to find out what the error really was, in order to correct it.

    I am not enough of an expert in certificate processing to help you diagnose a certificate problem. The certificate in question seems to be related to SSL (Secure Sockets Layer, a protocol that encrypts traffic to and from web pages and/or web services).
    If you turn off SSL, the problem might not appear. You would have to use «http» URLs instead of «https» URLs. I recommend you go find out whether this would be an acceptable workaround, given that your only programmer has quit and the deadline is next week.

    • Marked as answer by

      Thursday, October 7, 2021 12:00 AM

Форум КриптоПро
 » 
КриптоПро УЦ
 » 
КриптоПро УЦ 1.5
 » 
Проблема с установкой ЦР. : An unknown error occurred while processing the certificate.


Offline

varlamand

 


#1
Оставлено
:

9 августа 2012 г. 18:32:56(UTC)

varlamand

Статус: Участник

Группы: Участники

Зарегистрирован: 09.08.2012(UTC)
Сообщений: 10

Доброго дня!

Выполняю установку ЦР на Windows Server 2008 R2. КриптоПро CSP 3.6 R2 6497 KC2 x64 стоит. Все настройки по руководству. При установке самого ЦР на этапе установки SQL вылезает:
UserPostedImage

В логах выводит следующее:

SQL service MSSQL$CPCC started successfully waiting for SQL service to accept client connections
Service MSSQL$CPCC started at Thu Aug 09 12:32:04 2012
SQL_ERROR (-1) in OdbcConnection::connect
sqlstate=08001, level=-1, state=-1, native_error=-2146893017, msg=[Microsoft][SQL Native Client]SSL Provider: An unknown error occurred while processing the certificate.

sqlstate=08001, level=-1, state=-1, native_error=-2146893017, msg=[Microsoft][SQL Native Client]Client unable to establish connection

Error Code: -2146893017
Windows Error Text: An unknown error occurred while processing the certificate.
Source File Name: libodbc_connection.cpp
Compiler Timestamp: Sat Sep 18 20:51:17 2010
Function Name: OdbcConnection::connect@connect
Source Line Number: 148

—- Context ————————————————

Connecting to SQL Server
ExecuteSqlCommands
Originial error was 80090327 (807)
cript
SqlScriptHlpr

Error Code: -2146893017
MSI (s) (C4!64) [12:34:05:812]: Product: Microsoft SQL Server 2005 Express Edition — Error 29515. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]SSL Provider: An unknown error occurred while processing the certificate.
Refer to server error logs and setup logs for more information. For details on how to view setup logs, see «How to View Setup Log Files» in SQL Server Books Online.

Error 29515. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]SSL Provider: An unknown error occurred while processing the certificate.
Refer to server error logs and setup logs for more information. For details on how to view setup logs, see «How to View Setup Log Files» in SQL Server Books Online.
<Func Name=’GetCAContext’>
<EndFunc Name=’GetCAContext’ Return=’T’ GetLastError=’203′>
Doing Action: Do_sqlScript
PerfTime Start: Do_sqlScript : Thu Aug 09 12:34:05 2012
Service MSSQL$CPCC with parameters ‘-m SqlSetup -Q -qCyrillic_General_CI_AS -T4022 -T3659 -T3610 -T4010’ is being started at Thu Aug 09 12:34:05 2012
Attempt to start service when it is already running
SQL service MSSQL$CPCC started successfully waiting for SQL service to accept client connections
Service MSSQL$CPCC started at Thu Aug 09 12:34:05 2012
SQL_ERROR (-1) in OdbcConnection::connect
sqlstate=08001, level=-1, state=-1, native_error=-2146893017, msg=[Microsoft][SQL Native Client]SSL Provider: An unknown error occurred while processing the certificate.

sqlstate=08001, level=-1, state=-1, native_error=-2146893017, msg=[Microsoft][SQL Native Client]Client unable to establish connection

Error Code: -2146893017
Windows Error Text: An unknown error occurred while processing the certificate.
Source File Name: libodbc_connection.cpp
Compiler Timestamp: Sat Sep 18 20:51:17 2010
Function Name: OdbcConnection::connect@connect
Source Line Number: 148

Кто сталкивался с похожей ошибкой, можете помочь?


Вверх


Offline

dedov

 


#2
Оставлено
:

9 августа 2012 г. 19:13:10(UTC)

dedov

Статус: Эксперт

Группы: Участники

Зарегистрирован: 03.04.2008(UTC)
Сообщений: 372
Мужчина
Откуда: Россия, г. Белгород

Сказал «Спасибо»: 11 раз
Поблагодарили: 9 раз в 9 постах

криптопро на сервере ЦР должна иметь серверную лицензию!


Вверх


Offline

varlamand

 


#3
Оставлено
:

9 августа 2012 г. 19:19:33(UTC)

varlamand

Статус: Участник

Группы: Участники

Зарегистрирован: 09.08.2012(UTC)
Сообщений: 10

dedov написал:

криптопро на сервере ЦР должна иметь серверную лицензию!

Ага. И имеет. Подробнее пожалуйста, что вы имели в виду.


Вверх


Offline

dedov

 


#4
Оставлено
:

9 августа 2012 г. 19:58:00(UTC)

dedov

Статус: Эксперт

Группы: Участники

Зарегистрирован: 03.04.2008(UTC)
Сообщений: 372
Мужчина
Откуда: Россия, г. Белгород

Сказал «Спасибо»: 11 раз
Поблагодарили: 9 раз в 9 постах

посмотрите еще это


Вверх


Offline

varlamand

 


#5
Оставлено
:

9 августа 2012 г. 20:33:49(UTC)

varlamand

Статус: Участник

Группы: Участники

Зарегистрирован: 09.08.2012(UTC)
Сообщений: 10

Спасибо, помогло. Импортнул все что было в C:WindowsSystem32CertSrvCertEnroll, помогла установка другого crl. Странно, у меня вместе с веб-сертификатом был crl но почему-то ему был необходим другой.


Вверх

Пользователи, просматривающие эту тему

Guest

Форум КриптоПро
 » 
КриптоПро УЦ
 » 
КриптоПро УЦ 1.5
 » 
Проблема с установкой ЦР. : An unknown error occurred while processing the certificate.

Быстрый переход
 

Вы не можете создавать новые темы в этом форуме.

Вы не можете отвечать в этом форуме.

Вы не можете удалять Ваши сообщения в этом форуме.

Вы не можете редактировать Ваши сообщения в этом форуме.

Вы не можете создавать опросы в этом форуме.

Вы не можете голосовать в этом форуме.

answered on 26 Oct 2015, 10:36 PM

Hi Eric,

Thanks for the quick reply.

My HTTPS Protocols are set to ‘<client>;ssl3;tls1.0’.

The workaround you suggest is effective — thanks.​

I’ve verified on three separate machines that the upgrade from 4.6.0.2 to 4.6.1.0 results in a System.Security.Authentication.AuthenticationException being raised for the CONNECT request.

Here’s a comparison of the request and result from 4.6.0.2 and 4.6.1.0:

4.6.0.2:

CONNECT online.peopleschoicecu.com.au:443 HTTP/1.1

Host: online.peopleschoicecu.com.au

Connection: keep-alive

User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36

A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.

Version: 3.3 (TLS/1.2)

Random: D4 31 B7 07 02 A7 E7 0E C6 38 59 BB 11 AE A5 FB 22 B1 05 01 3D 6D CB 4C F9 51 38 6A 80 9E BB 71

"Time": 7/02/1974 4:19:16 PM

SessionID: empty

Extensions:

    renegotiation_info  00

    server_name online.peopleschoicecu.com.au

    extended_master_secret  empty

    SessionTicket   empty

    signature_algs  sha512_rsa, sha512_ecdsa, sha384_rsa, sha384_ecdsa, sha256_rsa, sha256_ecdsa, sha224_rsa, sha224_ecdsa, sha1_rsa, sha1_ecdsa

    status_request  OCSP - Implicit Responder

    NextProtocolNego    empty

    SignedCertTimestamp (RFC6962)   empty

    ALPN        http/1.1, spdy/3.1, h2-14, h2

    channel_id(GoogleDraft) empty

    ec_point_formats    uncompressed [0x0]

    elliptic_curves secp256r1 [0x17], secp384r1 [0x18]

Ciphers:

    [C02B]  TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

    [C02F]  TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

    [009E]  TLS_DHE_RSA_WITH_AES_128_GCM_SHA256

    [CC14]  TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256

    [CC13]  TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256

    [CC15]  TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256

    [C00A]  TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA

    [C014]  TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA

    [0039]  TLS_DHE_RSA_WITH_AES_256_SHA

    [C009]  TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

    [C013]  TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA

    [0033]  TLS_DHE_RSA_WITH_AES_128_SHA

    [009C]  TLS_RSA_WITH_AES_128_GCM_SHA256

    [0035]  TLS_RSA_AES_256_SHA

    [002F]  TLS_RSA_AES_128_SHA

    [000A]  SSL_RSA_WITH_3DES_EDE_SHA

Compression:

    [00]    NO_COMPRESSION

-----

HTTP/1.1 200 Connection Established

FiddlerGateway: Direct

StartTime: 08:45:24.451

Connection: close

Encrypted HTTPS traffic flows through this CONNECT tunnel. HTTPS Decryption is enabled in Fiddler, so decrypted sessions running in this tunnel will be shown in the Web Sessions list.

Secure Protocol: Tls

Cipher: TripleDes 168bits

Hash Algorithm: Sha1 160bits

Key Exchange: RsaKeyX 2048bits

== Server Certificate ==========

[Subject]

  CN=online.peopleschoicecu.com.au, OU=Digital, O=People's Choice Credit Union (Australian Central Credit Union Ltd), L=Adelaide, S=South Australia, C=AU, PostalCode=5000, STREET=60 Light Square, SERIALNUMBER=087 651 125, OID.1.3.6.1.4.1.311.60.2.1.3=AU, OID.2.5.4.15=Private Organization

[Issuer]

  CN=DigiCert SHA2 Extended Validation Server CA, OU=www.digicert.com, O=DigiCert Inc, C=US

[Serial Number]

  075E916FB874EFDC28EFEBE57D4E941C

[Not Before]

  5/05/2015 10:00:00 AM

[Not After]

  28/07/2017 10:00:00 PM

[Thumbprint]

  25B606FC2E967B9CDB81229B03E92AE88F749DC9

4.6.1.0:

CONNECT online.peopleschoicecu.com.au:443 HTTP/1.1

Host: online.peopleschoicecu.com.au

Connection: keep-alive

User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36

A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.

Version: 3.3 (TLS/1.2)

Random: FC 39 DE 18 7F F9 D9 DF 1A AC 9F 81 B5 61 B2 45 5B 2F 30 24 E9 C7 AC F9 B5 44 E4 BD BF 26 6A 8C

"Time": 23/03/1983 8:37:00 AM

SessionID: D9 06 00 00 42 9C A6 C9 6D 4B 2D 7F EB 12 9E 6B 0E 8D 0C 16 96 F6 A2 F5 43 ED CB 51 48 F9 26 A5

Extensions:

    renegotiation_info  00

    server_name online.peopleschoicecu.com.au

    extended_master_secret  empty

    SessionTicket   empty

    signature_algs  sha512_rsa, sha512_ecdsa, sha384_rsa, sha384_ecdsa, sha256_rsa, sha256_ecdsa, sha224_rsa, sha224_ecdsa, sha1_rsa, sha1_ecdsa

    status_request  OCSP - Implicit Responder

    NextProtocolNego    empty

    SignedCertTimestamp (RFC6962)   empty

    ALPN        http/1.1, spdy/3.1, h2-14, h2

    channel_id(GoogleDraft) empty

    ec_point_formats    uncompressed [0x0]

    elliptic_curves secp256r1 [0x17], secp384r1 [0x18]

    padding 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Ciphers:

    [C02B]  TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

    [C02F]  TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

    [009E]  TLS_DHE_RSA_WITH_AES_128_GCM_SHA256

    [CC14]  TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256

    [CC13]  TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256

    [CC15]  TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256

    [C00A]  TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA

    [C014]  TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA

    [0039]  TLS_DHE_RSA_WITH_AES_256_SHA

    [C009]  TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

    [C013]  TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA

    [0033]  TLS_DHE_RSA_WITH_AES_128_SHA

    [009C]  TLS_RSA_WITH_AES_128_GCM_SHA256

    [0035]  TLS_RSA_AES_256_SHA

    [002F]  TLS_RSA_AES_128_SHA

    [000A]  SSL_RSA_WITH_3DES_EDE_SHA

Compression:

    [00]    NO_COMPRESSION

-----

HTTP/1.1 200 Connection Established

FiddlerGateway: Direct

StartTime: 08:50:14.139

Connection: close

fiddler.network.https> HTTPS handshake to online.peopleschoicecu.com.au (for #107) failed. System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < The message received was unexpected or badly formatted

Win32 (SChannel) Native Error Code: 0x80090326

  1. Jun 25th, 2019, 06:10 PM


    #1

    Brad. is offline

    Thread Starter


    Lively Member


    Resolved [RESOLVED] An unknown error occured when processing the certificate

    Hi All,

    Using WinHTTP Services 5.1 with VB6 on Windows 7 to post data to an (HTTPS) API. My (static) IP address has been whitelisted on the remote host and we are using HMAC tokens to authenticate to the endpoint. Basic code below:

    Code:

    oAPI.setTimeouts 0, 600000, 600000, 600000
    oAPI.Open "POST", sURL, False
    sBody = oXMLDoc.xml
    oAPI.setRequestHeader "mac", sToken
    oAPI.setRequestHeader "Content-Type", "application/xml"
    oAPI.Send sBody

    However on the .Send call we are receiving -2146893017 (80090327) An unknown error occurred while processing the certificate.

    I have tried adding the following options immediately after the .Open call with no success (we still receive the same error message):

    Code:

    oAPI.Option(WinHttpRequestOption_UserAgentString) = "IE11"
    oAPI.Option(WinHttpRequestOption_SecureProtocols) = SecureProtocol_ALL
    oAPI.Option(WinHttpRequestOption_EnableRedirects) = True
    oAPI.Option(WinHttpRequestOption_EnableHttpsToHttpRedirects) = True
    oAPI.Option(WinHttpRequestOption_SslErrorIgnoreFlags) = SslErrorFlag_Ignore_All

    Running IE11, and have confirmed SSL 2.0, 3.0 and TLS 1.0, 1.1 and 1.2 are all enabled.

    Any assistance is (as always) greatly appreciated!

    Best Regards
    Brad


  2. Jun 26th, 2019, 02:47 AM


    #2

    Re: An unknown error occured when processing the certificate

    Try SecureProtocol_TLS1_2 for WinHttpRequestOption_SecureProtocols

    Check out this update too: https://support.microsoft.com/en-us/help/3140245

    cheers,
    </wqw>


  3. Jun 26th, 2019, 09:31 AM


    #3

    Brad. is offline

    Thread Starter


    Lively Member


    Re: An unknown error occured when processing the certificate

    Hi wqweto,

    I have applied the easy fix for registry values as well as added the DisabledByDefault values under the ‘TLS 1.1Client’ and ‘TLS 1.2Client’ and restarted, however I get a variable not defined error when I try to use SecureProtocol_TLS1_2 as the value for oAPI.Option(WinHttpRequestOption_SecureProtocols).


  4. Jun 26th, 2019, 11:32 PM


    #4

    Brad. is offline

    Thread Starter


    Lively Member


    Re: An unknown error occured when processing the certificate

    Got it figured out. Code was fine, was a miscommunication from other side’s technical support. Appreciate the help!


I used TcpListener and SslStream of c# to set up HTTPS Server, which worked well in the browser, but was not accessible by the simple-http-server project and libcurl project. Error message:

System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.ProcessAuthentication(LazyAsyncResult lazyResult, CancellationToken cancellationToken)
   at System.Net.Security.SslStream.AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions)
   at System.Net.Security.SslStream.AuthenticateAsServer(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
   at Sparrow.SparrowServer._loop_process() in F:ProjectSparrowSparrowServer.cs:line 354

The error reporting code is as follows:

var _client = _listener.AcceptTcpClient ();
using (var _ssl_stream = new SslStream (_client.GetStream ())) {
    _ssl_stream.AuthenticateAsServer (m_pfx, false, SslProtocols.Tls, true); // This line of code causes an error
    _ssl_stream.ReadTimeout = _ssl_stream.WriteTimeout = m_alive_http_ms;
    // do others
}

If I don’t use SslStream and just use TcpListener to provide the HTTP service, it will work fine in all environments.

The PFX file for creating the certificate object is an iis file issued by the issuing authority. Without problems, m_pfx object USES ‘var m_pfx = new X509Certificate (_pfx_file, _pwd);’
Method creation.If ‘X509Certificate’ is changed to ‘X509Certificate2’ in the code, then the error message is:

System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
 ---> System.ComponentModel.Win32Exception (590615): 上下文已过期,不能再用了。
   --- End of inner exception stack trace ---
   at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
   at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.ProcessAuthentication(LazyAsyncResult lazyResult, CancellationToken cancellationToken)
   at System.Net.Security.SslStream.AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions)
   at System.Net.Security.SslStream.AuthenticateAsServer(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
   at Sparrow.SparrowServer._loop_process(TcpClient _client) in at Sparrow.SparrowServer._loop_process() in F:ProjectSparrowSparrowServer.cs:line 354

[edit: translate to English]

System.ComponentModel.Win32Exception (590615): The context has expired and can no longer be used

There are many posts online listing many different possible causes for these errors, so it’s not possible for this article to encompass all the solutions. These are just solutions to common causes for these errors. If the suggestions listed here don’t work for you, please email support at support@nsoftware.com

baltun

Ошибка 87 – говорит о том, что у нас на Windows 7 не выполняется команды

DISM /Online /Cleanup-image /ScanHealth
DISM /Online /Cleanup-image /RestoreHealth

Для этого требуется установить исправление KB2966583 в моем случае это помогло.

Вторая ошибка связана с работой RDP на Windows 7 при которой нельзя подключится к Windows 10.

Уровень безопасности сервера обнаружил ошибку (0x80090304) в потоке протокола

Для этого потребуется установить 2 исправления KB2592687 и KB2574819-v2-x86 мне опять же помогло, все обновления скачанные с Microsoft прилагаются во вложении. Возможно данный алгоритм можно применить и к Windows 7 x64

Последнее редактирование: 28 Июль 2021

Креатив

24.11.21 – 11:25

Есть крипто про 4. Необходимо установить stunnel. Интернет пишет, что он входит в комплект установки. Но там ничего подобного не видно.
Или он всё-таки устанавливается отдельно? Тогда, где его взять?

Garykom

1 – 24.11.21 – 11:28

Креатив

2 – 24.11.21 – 11:37

(1)Мне под винду.

Aleksey

3 – 24.11.21 – 11:40

(2) И?
На скриншоте как раз ссылки под винду и написано что в линуксе это встроено

Креатив

4 – 24.11.21 – 12:04

(3)Ну да. А оно с 4-й версие крипто про работать будет? И файлик подозрительно мелкий всего 89кб.

Garykom

5 – 24.11.21 – 12:05

(4) ты лучше скажи для чего собрался туннель делать

Креатив

6 – 24.11.21 – 12:06

(5)ГИИС ДМДК.

Garykom

7 – 24.11.21 – 12:28

Garykom

8 – 24.11.21 – 12:29


Для настройки клиентской станции необходимо:
1. Скачать приложение для создания TLS-туннеля stunnel.x86/x64 с
сайта https://www.cryptopro.ru/products/csp/downloads
2. Сохранить скаченное приложение в каталоге c:stunnel
3. Запустить командную строку от имени администратора и
выполнить c:stunnelstunnel.x64 -install
4. В каталоге c:windowssystem32 создать файл конфигурации
stunnel.conf со следующим содержимым:
output=c:stunnelstunnel.log

Креатив

9 – 24.11.21 – 16:17

(7)(8)Не читал. Пока тестовый контур пробую запустить. Благодарю за помощь.

BobG

10 – 09.02.22 – 23:13

Здравствуйте. Всё сделал по инструкции. Выдаёт ошибку:

Не удалось запустить службу Stunnel Service на Локальный компьютер
Ошибка 1069: Служба не запущена из-за ошибки входа в систему.

arsik

11 – 09.02.22 – 23:34

(10) Служба от кого запускается?

BobG

12 – 09.02.22 – 23:39

От Администратора

BobG

13 – 09.02.22 – 23:52

Эта ошибка была без пароля. Поставил пароль, Ошибка 1067: Процесс был неожиданно завершён

Сергиус

14 – 10.02.22 – 00:03

(13)Попробуйте переустановить службу.

Builder

15 – 10.02.22 – 00:26

Уже выкладывал тут кусок из инструкции от ювелирсофта

https://prnt.sc/26ndwxa

Это обязательное условие!

У меня все заработало 🙂

Сергиус

16 – 10.02.22 – 01:35

(15)Есть нормальный хостинг картинок?)

Anchorite

17 – 10.02.22 – 06:25

(13) У вас журналирование настроено? В настройках stunnel.conf проверьте опцию “output” — это путь к лог-файлу. Посмотрите, что там в журнале, выложите сюда вывод.

abfm

18 – 10.02.22 – 07:08

Вопрос как решился с сертификатом? У нас 3 раз бубен и третий раз разный.

Кирпич

19 – 10.02.22 – 08:13

Если туннель запускаете под системной учетной записью, то сертификат должен быть установлен в “Сертификаты локальный компьютер”. Если под другой учетной записью, то в хранилище этой учетной записи. Пароль доступа к контейнеру должен быть сохранен. Сертификат с открытым ключем сохранить на диске и прописать к нему путь в конфиге stunnel. В инструкции всё написано.
Смысл этой байды в том, что stunnel должен иметь доступ к закрытому ключу, который у вас в хранилище. Чтобы иметь доступ к хранилищу пользователя, stunnel должен запускаться от этого пользователя. Пароль от контейнера он спрашивать не умеет, потому пароль должен быть вбит заранее и сохранен (галку там поставить).

abfm

20 – 10.02.22 – 08:58

(19)Да конечно всё по инструкции. Всё от одного пользователя. Сертификат сохранен без ключа. Прописан в конфиге. При старте ругается на сертификат. Где то только в консольной версии работает. Где то как служба. ДМДК пишут об обезличенном сертификате, народ утверждает что такие не выдают для ип (проверить не могу). Чем он лучше не говорят. ЮвелирСофт всё молиться на прямые руки сисадмина и просит 14000 за настройку stunnel.


Offline

wraithik

 

Оставлено
:

25 февраля 2022 г. 17:13:22(UTC)

Установлен stunnel
Содержимое конф-файла

Сертификат получен в налоговой, он обезличенный.
В логах stunnel

2022.02.25 17:00:31 LOG5[4288:5908]: try to read the client certificate
2022.02.25 17:00:31 LOG7[4288:5908]: open file c:stunnelcert.cer with certificate
2022.02.25 17:00:31 LOG3[4288:5908]: **** Error 0x80090304 returned by AcquireCredentialsHandle
2022.02.25 17:00:31 LOG3[4288:5908]: Credentials complete
2022.02.25 17:00:31 LOG3[4288:5908]: Error creating credentials

Сертификат установлен в личное хранилище. КриптоПро 5.0.120.
Подскажите что с этим делать.


Online

Александр Лавник

 

Оставлено
:

25 февраля 2022 г. 17:17:09(UTC)

Автор: wraithik Перейти к цитате

Установлен stunnel
Содержимое конф-файла

Сертификат получен в налоговой, он обезличенный.
В логах stunnel

2022.02.25 17:00:31 LOG5[4288:5908]: try to read the client certificate
2022.02.25 17:00:31 LOG7[4288:5908]: open file c:stunnelcert.cer with certificate
2022.02.25 17:00:31 LOG3[4288:5908]: **** Error 0x80090304 returned by AcquireCredentialsHandle
2022.02.25 17:00:31 LOG3[4288:5908]: Credentials complete
2022.02.25 17:00:31 LOG3[4288:5908]: Error creating credentials

Сертификат установлен в личное хранилище. КриптоПро 5.0.120.
Подскажите что с этим делать.

Здравствуйте.

Сертификат установлен в хранилище “Личное” компьютера (не текущего пользователя) с привязкой к ключевому контейнеру?

На ключе не установлен пин-код?


Offline

wraithik

 

Оставлено
:

25 февраля 2022 г. 17:21:17(UTC)

Нет. В носитель заходит без пин-кода через протестировать.

Как точно проверить что пароля нет или удалить?

Отредактировано пользователем 25 февраля 2022 г. 17:26:24(UTC)
 | Причина: Не указана


Online

Александр Лавник

 

Оставлено
:

25 февраля 2022 г. 17:30:32(UTC)

Автор: wraithik Перейти к цитате

Нет. В носитель заходит без пин-кода через протестировать.

Как точно проверить что пароля нет или удалить?

Какой ключевой носитель?


Offline

wraithik

 

Оставлено
:

25 февраля 2022 г. 17:41:03(UTC)

Проверка завершена успешно ошибок не обнаружено
Контейнер закрытого ключа пользователя
Имя b051432a-d2df-4eed-8cd7-123feaa3a393
Уникальное имя SCARDrutoken_lt_3f5461a4A00AF21
FQCN \.Aktiv Rutoken lite 0b051432a-d2df-4eed-8cd7-123feaa3a393
Проверка целостности контейнера успешно
Ключ обмена доступен
длина ключа 512 бит
экспорт открытого ключа успешно
вычисление открытого ключа успешно
импорт открытого ключа успешно
подпись успешно
проверка успешно
создание ключа обмена успешно
экспорт ключа запрещен
алгоритм ГОСТ Р 34.10-2012 DH 256 бит
ГОСТ Р 34.10 256 бит, параметры обмена по умолчанию
ГОСТ Р 34.11-2012 256 бит
ГОСТ 28147-89, параметры шифрования ТК26 Z
сертификат в контейнере соответствует закрытому ключу
имя сертификата ООО “ГРИФОН”
субъект ИНН ЮЛ=6154096952, ОГРН=1056154061754, E=grifon_jurwelir@mail.ru, C=RU, S=61 Ростовская область, L=Таганрог, STREET=”ул. Поляковское шоссе, д. 17″, O=”ООО “”ГРИФОН”””, OU=615401001, CN=”ООО “”ГРИФОН”””
поставщик E=uc@nalog.ru, ОГРН=1047707030513, ИНН=007707329152, C=RU, S=77 Москва, L=г. Москва, STREET=”ул. Неглинная, д. 23″, OU=УЦ ЮЛ, O=Федеральная налоговая служба, CN=Федеральная налоговая служба
действителен с 25 февраля 2022 г. 12:32:50
действителен по 25 мая 2023 г. 12:42:50
ключ действителен с 25 февраля 2022 г. 12:32:50
ключ действителен по 25 мая 2023 г. 12:32:50
серийный номер 7714 A000 47AE 739B 4C8E 244E 3E2D 4903
сертификат в хранилище My
субъект ИНН ЮЛ=6154096952, ОГРН=1056154061754, E=grifon_jurwelir@mail.ru, C=RU, S=61 Ростовская область, L=Таганрог, STREET=”ул. Поляковское шоссе, д. 17″, O=”ООО “”ГРИФОН”””, OU=615401001, CN=”ООО “”ГРИФОН”””
cсылка на закрытый ключ SCARDrutoken_lt_3f5461a4A00AF21; Crypto-Pro GOST R 34.10-2012 Cryptographic Service Provider#80; dwFlags: 0x00000000; dwKeySpec: AT_KEYEXCHANGE#1
AddressBook
субъект ИНН ЮЛ=6154096952, ОГРН=1056154061754, E=grifon_jurwelir@mail.ru, C=RU, S=61 Ростовская область, L=Таганрог, STREET=”ул. Поляковское шоссе, д. 17″, O=”ООО “”ГРИФОН”””, OU=615401001, CN=”ООО “”ГРИФОН”””
cсылка на закрытый ключ отсутствует
cрок действия закрытого ключа 25 мая 2023 г. 12:32:50
использование ключа обмена разрешено до окончания срока действия закрытого ключа.
Ключ подписи отсутствует
Симметричный ключ отсутствует
Загрузка ключей успешно
Версия контейнера 2
Значение ControlKeyTimeValidity 1
Режим работы CSP библиотека
Расширения контейнера
некритическое Расширение контейнера КриптоПро CSP. Срок действия ключа обмена
действителен по 25 мая 2023 г. 12:55:03


Online

Александр Лавник

 

Оставлено
:

25 февраля 2022 г. 17:47:07(UTC)

В Рутокен Lite по умолчанию пин-код “12345678”.

Попробуйте добавить строку:

в секцию [https] конфигурационного файла stunnel, после этого перезапустите службу stunnel и проверьте.


Offline

wraithik

 

Оставлено
:

25 февраля 2022 г. 19:04:44(UTC)

Добавил пин.

Теперь в логах:

2022.02.25 19:02:36 LOG5[5492:4976]: try to read the client certificate
2022.02.25 19:02:36 LOG7[5492:4976]: open file c:stunnelcert.cer with certificate
2022.02.25 19:02:36 LOG5[5492:4976]: pincode option is present. Call CryptSetProvParam
2022.02.25 19:02:36 LOG3[5492:4976]: CryptAcquireCertificatePrivateKey failed. Error = 0x8009001a
2022.02.25 19:02:36 LOG3[5492:4976]: Error creating credentials
2022.02.25 19:02:36 LOG5[5492:4976]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2022.02.25 19:02:36 LOG7[5492:4976]: free Buffers
2022.02.25 19:02:36 LOG5[5492:4976]: incomp_mess = 0, extra_data = 0
2022.02.25 19:02:36 LOG7[5492:4976]: https finished (0 left)


Offline

wraithik

 

Оставлено
:

28 февраля 2022 г. 11:14:32(UTC)

Добрый день.
Ваш специалист может подключится по удаленке и помочь решить вопрос?


Online

Александр Лавник

 

Оставлено
:

28 февраля 2022 г. 22:59:07(UTC)

Автор: wraithik Перейти к цитате

Добрый день.
Ваш специалист может подключится по удаленке и помочь решить вопрос?

Здравствуйте.

Если вопрос еще актуален, то напишите в ЛС – согласуем время подключения.


Offline

Дмитрий Масленников

 

Оставлено
:

17 марта 2022 г. 12:17:53(UTC)

Добрый день. аналогичную ошибку выводит. вам удалось решить вопрос??


Online

Александр Лавник

 

Оставлено
:

17 марта 2022 г. 13:49:54(UTC)

Автор: Дмитрий Масленников Перейти к цитате

Добрый день. аналогичную ошибку выводит. вам удалось решить вопрос??

Здравствуйте.

По данному вопросу с вами общается по e-mail наш специалист (обращение № 47954).


Offline

Aleksander_P

 

Оставлено
:

19 мая 2022 г. 12:35:00(UTC)

Добрый день!
Аналогичная проблема возникла, при это 1,5-2 месяца работало, теперь выходит
2022.05.19 12:16:58 LOG5[4664:12776]: try to read the client certificate
2022.05.19 12:16:58 LOG7[4664:12776]: open file C:stunnelclicer.cer with certificate
2022.05.19 12:16:58 LOG3[4664:12776]: **** Error 0x80090304 returned by AcquireCredentialsHandle
2022.05.19 12:16:58 LOG3[4664:12776]: Credentials complete
2022.05.19 12:16:58 LOG3[4664:12776]: Error creating credentials
как решили данную проблему?


Offline

eugenimur

 

Оставлено
:

22 августа 2022 г. 16:17:00(UTC)

Добрый день! Все работало, поменяли сертификат в налоговой. выводило такую же ошибку. Прописал пин в конфигурационный файл. Теперь выдает 2022.08.22 16:03:50 LOG7[76200:71916]: open file C:stunnelclicer.cer with certificate
2022.08.22 16:03:50 LOG5[76200:71916]: pincode option is present. Call CryptSetProvParam
2022.08.22 16:03:50 LOG3[76200:71916]: CryptAcquireCertificatePrivateKey failed. Error = 0x80090016
2022.08.22 16:03:50 LOG3[76200:71916]: Error creating credentials
2022.08.22 16:03:50 LOG5[76200:71916]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2022.08.22 16:03:50 LOG7[76200:71916]: free Buffers
2022.08.22 16:03:50 LOG5[76200:71916]: incomp_mess = 0, extra_data = 0
2022.08.22 16:03:50 LOG7[76200:71916]: https finished (0 left)


Offline

Андрей *

 

Оставлено
:

22 августа 2022 г. 16:29:08(UTC)

0x80090016 Набор ключей не существует

Где контейнер,
результаты тестирования через панель управления…?


Offline

eugenimur

 

Оставлено
:

22 августа 2022 г. 18:55:28(UTC)

Контейнер на рутокене
Проверка завершена успешно ошибок не обнаружено
Контейнер закрытого ключа пользователя
имя 39c2cdf1-1d5e-4259-bff9-135a83e95ade
уникальное имя SCARDrutoken_lt_3f1b7625B00F3FE
FQCN \.Aktiv Rutoken lite 039c2cdf1-1d5e-4259-bff9-135a83e95ade
проверка целостности контейнера успешно
Ключ обмена доступен
длина ключа 512 бит
экспорт открытого ключа успешно
вычисление открытого ключа успешно
импорт открытого ключа успешно
подпись успешно
проверка успешно
создание ключа обмена успешно
экспорт ключа запрещен
алгоритм ГОСТ Р 34.10-2012 DH 256 бит
ГОСТ Р 34.10 256 бит, параметры обмена по умолчанию
ГОСТ Р 34.11-2012 256 бит
ГОСТ 28147-89, параметры шифрования ТК26 Z
сертификат в контейнере соответствует закрытому ключу
сертификат в хранилище My
ИНН ЮЛ=3306004329, СНИЛС=01933032319, ОГРН=1023300712621, ИНН=330600658180, C=RU, S=33 Владимирская область, L=КОЛЬЧУГИНО Г, STREET=”ЛЕНИНА ПЛ, 6″, O=”ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ “”ШАНС”””, CN=”ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ “”ШАНС”””, T=ГЕНЕРАЛЬНЫЙ ДИРЕКТОР, G=ТАМАРА АРКАДЬЕВНА, SN=МОЧАЛОВА
SCARDrutoken_lt_3f1b7625B00F3FE; Crypto-Pro GOST R 34.10-2012 Cryptographic Service Provider#80; dwFlags: 0x00000000; dwKeySpec: AT_KEYEXCHANGE#1
имя сертификата ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ “ШАНС”
субъект ИНН ЮЛ=3306004329, СНИЛС=01933032319, ОГРН=1023300712621, ИНН=330600658180, C=RU, S=33 Владимирская область, L=КОЛЬЧУГИНО Г, STREET=”ЛЕНИНА ПЛ, 6″, O=”ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ “”ШАНС”””, CN=”ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ “”ШАНС”””, T=ГЕНЕРАЛЬНЫЙ ДИРЕКТОР, G=ТАМАРА АРКАДЬЕВНА, SN=МОЧАЛОВА
поставщик ИНН ЮЛ=7707329152, E=uc@tax.gov.ru, ОГРН=1047707030513, C=RU, S=77 Москва, L=г. Москва, STREET=”ул. Неглинная, д. 23″, O=Федеральная налоговая служба, CN=Федеральная налоговая служба
действителен с 15 августа 2022 г. 11:33:12
действителен по 15 ноября 2023 г. 11:43:12
ключ действителен с 15 августа 2022 г. 11:33:12
ключ действителен по 15 ноября 2023 г. 11:33:12
серийный номер 01E7 B38F 00F2 AE17 8448 5840 AA40 CF38 99
лицензия 449 дней
Срок действия закрытого ключа 15 ноября 2023 г. 11:33:12
Использование ключа обмена разрешено до окончания срока действия закрытого ключа.
Ключ подписи отсутствует
загрузка ключей успешно
Версия контейнера 2
Расширения контейнера
некритическое Расширение контейнера КриптоПро CSP. Срок действия ключа обмена
действителен по 15 ноября 2023 г. 11:44:08

Содержание

  1. Errors
  2. Possible Solutions
  3. Possible Solutions
  4. Possible Solutions
  5. Possible Causes
  6. Possible Solutions
  7. Possible Solutions

Errors

  • 80090302
  • 8009030D
  • 8009030E
  • 80090304
  • 80090308
  • 80090325
  • 80090326
  • 80090327
  • 80090331
  • 8009035D
  • 8009030F and 80090321

This error can occur when the component is using an older version of TLS, but the server requires a newer version. For instance if the component is using TLS 1.0, but the server requires TLS 1.2, you can see this error. Older versions of the components may not have the newer protocols enabled by default. In the current versions TLS 1.2 is enabled by default.

    Possible Solutions

  • Enable Supported Protocol Versions

    This can be done on any of the components that support SSL by using the SSLEnabledProtocols configuration setting. As an example setting the Icharge component to use TLS 1.2 would look like this

    Please note the documentation linked above is specifically for the current .NET Editions. For other editions or older versions please reference the help file included with the product.

This error is often seen when using PEM keys, and translates to “The credentials supplied to the package were not recognized”.

    Possible Solutions

  • Translate the PEM file into a PFX file.

    Using OpenSSL, the certificate can be converted with the command:

    openssl pkcs12 -export -passout pass:”” -in cert_key_pem.txt -out cert_key_out.pfx -name “My Certificate”

    Then change the SSLCertStoreType to PFXFile in your code, before setting the SSLCertSubject.

  • Ensure the Network Service account has access to “C:Documents and SettingsAll UsersApplication DataMicrosoftCryptoRSA.”
  • If using a certificate from a Windows certificate store verify the certificate was imported wit the “Mark this key as exportable” option checked.
  • If you are running the components from IIS, ensure that the Application Pool has Load User Profile set to true.

This error translates to “No credentials are available in the security package”.

    Possible Solutions

  • When using a certificate for client authentication, ensure the certificate’s private keys are accessible.
    The certificate in the Windows certificate store must contain the corresponding private keys, and be marked as exportable.
  • Ensure that the current user and administrators have full access to “C:Documents and SettingsAll UsersApplication DataMicrosoftCryptoRSAMachineKeys”.
  • Import the certificates directly into both LOCAL_MACHINEPersonal and ADAMPersonal if ADAM is installed.

This error translates to “The Local Security Authority cannot be contacted “.

  • This error may to be related to Windows rejecting weak security. Microsoft KB 3061518 explains the issue. To summarize the article, simply set the ClientMinKeyBitLength DWORD value at the following location to 00000200.

    HKLMSYSTEMCurrentControlSetControlSecurityProvidersSCHANNELKeyExchangeAlgorithmsDiffie-Hellman

    After a restart, if this corrects the issue, then it is an indication that the server’s certificate uses a DHE Key length that is too small and should be updated.

  • Additional reasons and solutions for this problem are detailed in Microsoft KB 813550

This error translates to “The token supplied to the function is invalid “.

    Possible Causes

  • The server is using a certificate with an outdated signature algorithm. See this MSDN Article
  • The server doesn’t expect SSL over this port.
    Set the SSLStartMode property to sslExplicit.
  • FileZilla and other FTP servers require a PROT P command to be sent for the data connection when using implicit SSL.
    Set the UseProtWhenImplicit configuration setting to True.
  • The server returns a large number of CA’s in the handshake.

Also see this Knowledge Base article about this error: SSL: Error During Handshake: 80090308

This error translatest to “The certificate chain was issued by an authority that is not trusted.”

The SSL client certificate specified in the request was not accepted by the server. During the SSL handshake the issuer certificates of the SSL client certificate are not included. In Linux the OpenSSLCADir configuration setting must be set to the directory where the hash files exist so the chain is included. In Windows the issuer certs must be in the Personal store. In Java, the issuer certificates are read from the PEM file.

This error translates to “The message received was unexpected or badly formatted.”

    Possible Solutions

  • This error may also happen if the server and client don’t posses a common supported cipher suite. This can be the case if you’re connecting from Windows XP to a site that has recent/strict security requirements. Here is a list of ciphers supported in XP. Setting UseInternalSecurityAPI to true may help with this error as it supports many newer protocols not supported on older systems.
  • Client authentication is required. Ensure that you are loading the certificate correctly.
  • The server does not support the SSL Client Hello version being used. Set the SSLEnabledProtocols configuration setting to an appropriate value.
  • The server does not support SSL session re-use. You can disable this by setting the ReuseSSLSession and/or ReuseSSLSessionInDI configuration setting to false.
  • The server returns SSL handshake packets larger than 16K. This is a CryptoAPI limitation.

In ThreeDSecure, this error is typically related to a problem with client authentication.

This error translates to “An unknown error occurred while processing the certificate.”

This usually means that the server requires SSL client authentication and a new certificate is specified. Check the SSLStatus Event for details.

This error translates to “The client and server cannot communicate, because they do not possess a common algorithm”.

Most commonly, especially with Windows XP/Windows Server 2003, the client is probably old and doesn’t support the newer ciphers required by the server. Here is a list of ciphers supported in XP.

This error translates to “One or more of the parameters passed to the function was invalid.”

    Possible Solutions

  • Similar to 80090304, this error may to be related to Windows rejecting weak security. Microsoft KB 3061518 explains the issue. To summarize the article, simply set the ClientMinKeyBitLength DWORD value at the following location to 00000200.

    After a restart, if this corrects the issue, then it is an indication that the server’s certificate uses a DHE Key length that is too small and should be updated.

  • The below Windows updates have been known to cause the issue:
    • KB3172605
    • KB3175024
    • KB3177186
    • KB3184122
    • KB3185911
  • Additional reasons and solutions for this problem are detailed in Microsoft KB 813550

These errors are known to occur on Windows 8.1 and Windows Server 2012 R2 when using TLS 1.2 and one of the following cipher suites:

  • TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_DHE_RSA_WITH_AES_256_GCM_SHA384

The aforementioned versions of Windows have a bug in their internal security implementations which, under very specific circumstances, can produce either the 0x80090321 (SEC_E_BUFFER_TOO_SMALL) error or the 0x8009030F (SEC_E_MESSAGE_ALTERED) error.

Due to the nature of the issue, we cannot provide a direct fix. However, you can work around these errors by doing one of the following things:

  • Use our internal security API by passing the string “UseInternalSecurityAPI=True” to the Config() method. Our internal security API does not rely on the Windows security APIs, so it is not affected by the bug.
  • Disable the two cipher suites mentioned above
  • Disable support for TLS 1.2
  • Upgrade your machine to a newer version of Windows

We appreciate your feedback.  If you have any questions, comments, or
suggestions about this entry please contact our support team at
kb@nsoftware.com
.

Понравилась статья? Поделить с друзьями:
  • Error an unknown error has occurred do you want to try rejoining
  • Error adding monitor mode interface command failed operation not supported 95
  • Error adding firewall policies tenorshare
  • Error add rails
  • Error adb exited with exit code 1 performing streamed install adb failed to install