SAP Knowledge Base Article - Preview

3085696 - SEC_E_WRONG_PRINCIPAL error occurred when call API via OS command "curl"

Symptom

When try to do connection test via OS command "curl" for example:

Curl -i -v -H <XML FILE> -u <PROXY> -X <POST> -d @<PATH> <BACK-END SERVICE URL> -o <PATH>


Connection failed and shows following output:


Failed response:

<THE COMMAND YOU ENTER>

........

Warning: Couldn't read data from file "
.....
* Connected to <BACK-END HOST> port <PORT NUMBER> (#0)
* schannel: SSL/TLS connection with  <BACK-END HOST&PORT> (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending  <XX> bytes...
* schannel: sent initial handshake data: sent <XX> bytes
* schannel: SSL/TLS connection with  <BACK-END HOST&PORT> (step 2/3)
* schannel: encrypted data got <XX>
* schannel: encrypted data buffer: offset  <XX> length  <XX>
* schannel: SNI or certificate check failed: SEC_E_WRONG_PRINCIPAL (0x80090322) - The target principal name is incorrect.
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection 0
* schannel: shutting down SSL/TLS connection with <BACK-END HOST&PORT>
* schannel: clear security context handle
curl: (35) schannel: SNI or certificate check failed: SEC_E_WRONG_PRINCIPAL (0x80090322) - The target principal name is incorrect.


  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection 0
* schannel: shutting down SSL/TLS connection with <BACK-END HOST&PORT>
* schannel: clear security context handle
curl: (77) schannel: next InitializeSecurityContext failed:  SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an untrusted authority


Read more...

Keywords

SEC_E_WRONG_PRINCIPAL, Curl, OS command, Certificate , KBA , CA-ML-IPA-S4 , RPA bots developed on S/4HANA using IRPA Tool , BC-SEC-SSL , Secure Sockets Layer Protocol , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.