Menu

Error while calling a https api.

2019-05-02
2019-05-02
  • Dipak Motiram Giri

    I was trying to call a api into project open but it gives me an error . Please see the attached document file.

     
  • Malte Sussdorff

    Malte Sussdorff - 2019-05-02

    You seem to be missing TLS installation in your application. Why are you using TCL to call into the REST API of project-open to being with? Is your application which calls project-open written in TCL?

    Having said that, here is what we used to do (in the old days) to get TLS installed, when we needed it for calling other APIs (not project-open, but a different system). We since moved over to using CURL calls, but as you seem to have a TCL application, here you go:

    cd /usr/local/src/
    apt-get -y install libssl-dev
    wget http://downloads.sourceforge.net/tls/tls1.6.7-src.tar.gz
    tar xzpf tls1.6.7-src.tar.gz
    cd tls1.6.7
    ./configure –with-ssl-dir=/usr –enable-threads –enable-shared –prefix=/usr/lib/aolserver4 –exec-prefix=/usr/lib/aolserver4 –with-tcl=/usr/lib/aolserver4/lib –with-tclinclude=/usr/lib/aolserver4/include/
    make install

    Just in case you do not have an application written in TCL which needs to call the project-open API (as in e.g. you frontend application which is written in ReactJS / Angular / Sencha), try one the excellent REST IDEs like https://www.getpostman.com to test the endpoint.

     
  • Dipak Motiram Giri

    Hi Malte,
    Sorry for the confusion. I am trying to call external API (OAuth 1.0a) from project open. When I am passing consumer_key and consumer_secret, I am getting an tls error shown in the attached screen shot. Could you please advise what changes can I make in project open?

    Thanks and Regards
    Dipak

     
  • Malte Sussdorff

    Malte Sussdorff - 2019-05-02

    Okay... you probably need to compile the TLS Module into the Naviserver and make it available as the module. This is the code I provided to you, but how you do this really depends on how you got the project-open installation started and especially Naviserver build (I assume you talk project-open 5.0 with Naviserver, not the old AOLserver version).

     

Log in to post a comment.