1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Stackoverflow]

Discussão em 'StackOverflow' iniciado por fdantas, Outubro 23, 2024.

  1. fdantas

    fdantas Administrator Moderador

    I am trying to use OpenEdge.Net.pl for making a call over https, and I am getting the next error message:

    Secure Socket Layer (SSL) failure. Error code 17424: SSL routines (9318)

    I've been reading for a while and the problem I'm having has to do with the fact that the URL I'm pointing to has multiple subdomains like:

    api.exampleurl.com, dev.exampleurl.com...

    From what I've seen and tested, with the 'ServerNameIndicator' parameter from the ClientLibraryBuilder class I could workaround this problem. In fact, in my local installation with version 12+ works. The problem is that in the server where I need to implement this functionallity the installed version is the 11.7.4 and from what I've seen, although the documentation says it was implemented in the 11.3+ version, this parameter didn't exist in that version since when checking my code it warns me with the next message:

    Could not locate element 'ServerNameIndicator' in class 'OpenEdge.Net.HTTP.Lib.ClientLibraryBuilder'. (12927)

    I've also tried adding the sslVerifyHost(FALSE) parameter but it doesn't seem to be doing anything at all.

    USING Progress.Json.ObjectModel.*.
    USING OpenEdge.Net.HTTP.*.
    USING OpenEdge.Net.HTTP.Lib.*.
    USING OpenEdge.Net.URI.

    DEFINE VARIABLE oPayload AS JsonObject NO-UNDO.
    DEFINE VARIABLE oURI AS URI NO-UNDO.
    DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO.
    DEFINE VARIABLE oLib AS IHttpClientLibrary NO-UNDO.
    DEFINE VARIABLE oClient AS IHttpClient NO-UNDO.
    DEFINE VARIABLE oResponse AS IHttpResponse NO-UNDO.

    oURI = NEW URI( 'https', 'api.exampleurl.com' ).
    oURI:path = '/custom/path'.

    oPayload = NEW JsonObject().
    oPayload:Add("data","example data").

    oRequest = RequestBuilder:pOST(oURI, oPayLoad):Request.

    oLib = ClientLibraryBuilder:Build()
    :sslVerifyHost(NO)
    :ServerNameIndicator('api.exampleurl.com')
    :LIBRARY.

    oClient = ClientBuilder:Build()
    :UsingLibrary( oLib )
    :Client.

    oResponse = oClient:Execute( oRequest ).


    How can I bypass this error? Is there any other way to perform a request to an URL without having this problem?

    Thanks in advance.

    Continue reading...

Compartilhe esta Página