[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] Using HTTPAPI and non *SYSTEM certificate store



Hi again, 

When you wrote that you cannot help me with the certificate and password, it means that is not possible to do? 




> El 6 mar 2017, a las 7:47, Thomas Raddatz <thomas.raddatz@xxxxxx> escribió:
> 
> Hi Christian,
> 
> I cannot help you with the "certificate" and "password", but you can change the generated stub to call https_init() before the stub calls http_url_post_raw2(). In the current version of the generated stub I would do that between "Authenticate pre-emptively, if configured" and the "dou" loop where http_url_post_raw2() is called:
> 
>  // Authenticate pre-emptively, if configured
>  if (%(var:portName+_Port_isAuthenticatePreemptively;75;'...')());
>     %(var:portName+_Port_authenticatePreemptively;75;'...')();
>  endif;
> 
>  https_init(...);
> 
>  dou (not HttpResponse_isAuthenticationError(http_rc));
>     // Get document from server and handle http redirects
>     // See also: WSDL2R88.HttpResponse_isRedirect()
>     dou (not HttpResponse_isRedirect(http_rc));
>        http_DebugLog_appendText(
>        '** ' + %char(%timestamp()) + ': Sending request to server');
> 
>        http_rc =
>           http_url_post_raw2(
>              url
>              : hInpStream
>              : %paddr('WSDL2R85_MessageContext_InputStream_read')
>              : MessageContext_getSize(hMsgCtx)
>              : 0
>              : %paddr('HTTP_receiveResponse')
>              : getTimeout()
>              : getUserAgent()
>              : '');
> 
>        if (HttpResponse_isRedirect(http_rc));
>           url = http_redir_loc();
>           hInpStream = reOpenInputStream(hMsgCtx: hInpStream);
>        endif;
>     enddo;
> 
> Thomas.
> 
> -----Ursprüngliche Nachricht-----
> Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von larsenvalverde@xxxxxxxxx
> Gesendet: Samstag, 4. März 2017 19:42
> An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: [Ftpapi] Using HTTPAPI and non *SYSTEM certificate store
> 
> Hello.
> 
> I’m using the WDSL2RPG and HTTPAPI to connect to a webservice, but I have a problem.  I need to use a digital certificate, and, for security reasons, it cannot be on *SYSTEM certificate store.
> 
> I know I can do this:
> 
> https_init(‘/ANOTHER_CERTIFICATE_STORE’:*ON:*ON:….)
> 
> But I don’t know how to tell httpapi  what certificate I need to use… and the password needed to use it.
> 
> Can anyone explain me how to do it, if it is possible? 
> 
> Thanks in advance.
> 
> Christian.
> _______________________________________________
> Ftpapi mailing list
> Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> http://scottklement.com/mailman/listinfo/ftpapi
> --
> IMPORTANT NOTICE:
> This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.
> _______________________________________________
> Ftpapi mailing list
> Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> http://scottklement.com/mailman/listinfo/ftpapi
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi