SSL_RESULT_SECURITY_LEVEL_ERR | developer.brewmp.com SSL_RESULT_SECURITY_LEVEL_ERR | developer.brewmp.com

Developer

SSL_RESULT_SECURITY_LEVEL_ERR

Forums:

I am trying to do HTTP POST to a HTTPs server using IWeb API. As part of the SSL handshaking, I got SSL_RESULT_SECURITY_LEVEL_ERR. Does anyone know what it means and how to fix it?

Notes: I am using everything default, except that ignoring cert errors for simplicity and testing:

    WebOpt              opts [MAX_OPTIONS];

    int optIx = 0; 

    if (m_piRootCert) 

    { 

        opts[optIx].nId = WEBOPT_DEFAULTS;

        opts[optIx++].pVal = (void*)m_piRootCert;

    }

    opts[optIx].nId = WEBOPT_SSL_TRUST_MODE;

    opts[optIx++].pVal = (void*)SSL_TRUST_MODE_IGNORE;

...

    opts[optIx].nId = WEBOPT_END;   // terminate web option array.

    IWEB_AddOpt(m_piWeb, opts);

 

In my response handler:

    WebRespInfo* pwri = IWEBRESP_GetInfo(me->m_piWResp);

    int err = WEB_ERROR_MAP(pwri->nCode);

    if (pwri->nCode < 0)

    {

        if (err == WEB_ERROR_SSL)

        {            WebOpt opt;

            SSLInfo* pSSLInfo = NULL;

            IWEBRESP_GetOpt(me->m_piWResp, WEBOPT_SSL_SEC_INFO, 0, &opt);

            pSSLInfo = (SSLInfo*)opt.pVal;

...

        }

    }

At this point pSSLInfo->nResult is 2560.

Much appreciated!

Correction:
At this point pSSLInfo->nResult is 2560.
Should be:
At this point pSSLInfo->nResult is 2575 (SSL_RESULT_SECURITY_LEVEL_ERR).
 
PS: my root cert is the default, created with
ISHELL_CreateInstance(PISHELL(), AEECLSID_SSLROOTCERTS, (void**)&m_piRootCert);
Thanks!

Correction:
At this point pSSLInfo->nResult is 2560.
Should be:
At this point pSSLInfo->nResult is 2575 (SSL_RESULT_SECURITY_LEVEL_ERR).
 
PS: my root cert is the default, created with
ISHELL_CreateInstance(PISHELL(), AEECLSID_SSLROOTCERTS, (void**)&m_piRootCert);
Thanks!