Search found 11 matches

by einschan
Sun May 26, 2024 12:53 am
Forum: HTTPAPI
Topic: How to set "Authorization" in http header
Replies: 7
Views: 29280

Re: How to set "Authorization" in http header

Hi

Thanks,
1. Can we tell from the command given by the the vender as below to choose Basic, Bearer ?

curl -k -X 'GET' 'https://abc.com/api/documents/tesing.jpg' -H 'accept:text/plain;charset=utf-8'
-H 'Authorization: 00000000-0000-0000-0000-000000000000'

They just say it is a token, instead of ...
by einschan
Sat May 25, 2024 12:12 pm
Forum: HTTPAPI
Topic: How to set "Authorization" in http header
Replies: 7
Views: 29280

How to set "Authorization" in http header

My vender ask me to type below to get the file testing.jpg, but should with setting ' Authorization ' in http header.
I cannot find any option in http_setOption( ), should I upgrade libhttp139 to a new version ?
I can only find below options:
'content-type', 'user-agent',....

curl -k -X 'GET ...
by einschan
Fri Aug 19, 2022 2:54 am
Forum: HTTPAPI
Topic: Get Cipher used in a SSL Connection
Replies: 11
Views: 34670

Re: Get Cipher used in a SSL Connection

Hi,

Lovely, it works for me too.
And also, I replace "GSK_CONNECT_SEC_TYPE" with "GSK_CONNECT_CIPHER_SPEC_EX", it is working too.

Many thanks

Regards
by einschan
Fri Aug 12, 2022 2:03 pm
Forum: HTTPAPI
Topic: Get Cipher used in a SSL Connection
Replies: 11
Views: 34670

Re: Get Cipher used in a SSL Connection

Hi

I just have a trial, but fail.

After changed the parameter wwBufferPtr to %Addr(wwBufferPtr), rc is 0 instead of 6010 ([GSK_IBMI_ERROR_INVALID_POINTER].
But wwBuffer is *NULL and wwBufSize = 0, that is, cannot get the cipher.

<-- Detail refer to "CommSSL_upgrade..." in COMMSSLR4 ...
by einschan
Fri Aug 12, 2022 6:27 am
Forum: HTTPAPI
Topic: Get Cipher used in a SSL Connection
Replies: 11
Views: 34670

Re: Get Cipher used in a SSL Connection

Hi

Thanks for your quick respond
You appear to be passing wwSlh, which as far as I can tell is set to *null -- so that won't work.
-> it is fine, you may refer to your "CommSSL_upgrade..." in COMMSSLR4.
-> I just add the "code for cipher" right after call SSL_protocol() in your coding

Also, with ...
by einschan
Thu Aug 11, 2022 5:27 am
Forum: HTTPAPI
Topic: Get Cipher used in a SSL Connection
Replies: 11
Views: 34670

Re: Get Cipher used in a SSL Connection

Hi,

Showing "servent" as reference for, how I learn to define a pointer of pointer, after reading "servent"
"const char ** aliases" in C can be defined as "D s aliases *" in RPG

As in https://www.ibm.com/docs/en/i/7.2?topic=ssw_ibm_i_72/apis/gsk_attribute_get_buffer.htm, I need to define "const ...
by einschan
Thu Aug 11, 2022 12:28 am
Forum: HTTPAPI
Topic: Get Cipher used in a SSL Connection
Replies: 11
Views: 34670

Re: Get Cipher used in a SSL Connection

Thank, but I just follow your coding in LIBHTTP145/QRPGLESRC/ GSKSSL_H
=================================
D gsk_attribute_get_buffer...
D PR 10I 0 extproc('gsk_attribute_get_buffer')
D my_gsk_handle like(gsk_handle) value
D bufID like(GSK_BUF_ID) value
D buffer * value
D bufSize 10I 0 ...
by einschan
Tue Aug 09, 2022 5:52 am
Forum: HTTPAPI
Topic: Get Cipher used in a SSL Connection
Replies: 11
Views: 34670

Get Cipher used in a SSL Connection

Hi,

After calling below successfully.
callp SSL_debug_cert_info(wkSSLh : GSK_PARTNER_CERT_INFO )
callp http_dmsg('Protocol Used: ' SSL_protocol(wkSSLh: *OMIT))

I try to get cipher in wkSSLh by
D wwBufferPtr S *
D wwBufSize s 10I 0

C Eval rc = gsk_attribute_get_buffer(wkSSLh:
GSK_CONNECT_SEC ...
by einschan
Fri Jul 08, 2022 8:44 am
Forum: HTTPAPI
Topic: Running Socket over TLS
Replies: 3
Views: 9915

Re: Running Socket over TLS

Hi Scott,

From COMMSSLR4, I think CommSSL_Connect in HTTPAPI can be used as your figure 3 in PDF
How about some function CommSSL_.... can be use as figure 2 , 4 and 5 ?

Regards
by einschan
Fri Jul 08, 2022 4:33 am
Forum: HTTPAPI
Topic: Running Socket over TLS
Replies: 3
Views: 9915

Re: Running Socket over TLS

Hi,

Thanks.

And I am studying your service program HTTPAPI
Can I use https_init to replace those below, (as in Figure 1 in your PDF) ?
- gsk_environment_open
- gsk_attribute_set_buffer
- gsk_environment_close
- gsk_attribute_set_enum

Then create the socket connection by "socket" afterwards.
- by ...