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

Re: SSL/GSKit message



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>



Scott, thanks for putting together the HTTPAPI - I was able to talk to Bank
of America and retrieve mailbox files within a couple of days. A lot of that
time was spent interpreting the conversation process and posting data
correctly to the server. And the automatic cookie support is great!


Glad to hear it!


I'm on V5R2, using SSL (5722AC3, etc.), HTTPAPI version 1.14. The program
runs successfully, but gives diagnostic message "(GSKit) An operation which
is not valid for the current SSL session state was attempted." I haven't
really isolated when the message is thrown.


Hmmm... it would help me to know what the error number is. To get that, turn HTTPAPI's debugging log on. You can do that by inserting the following code at the start of your program:

callp http_debug(*YES)

Then, when the GSKit error occurs, can you please look at the debug file? It'll be called /tmp/httpapi_Debug.txt and will be in the IFS.

What I'm looking for is the error number that corresponds to the message. It should be something like this:

   ssl_error(5): (GSkit) An operation which is not valid for the current
       SSL session state was attempted.

In that example, the error number is 5. (It's the number in parenthesis near the start). I suspect that the error you're receiving is also 5, but I'd like confirmation, if possible.


Although the sample programs don't do this, I'm coding https_cleanup() at
the end of my program. Do I need to use https_cleanup? When I run
https_init, I pass blanks. The program is registered as "POSPAY_RCV_HTTP'.

If you want to tell HTTPAPI to use the POSPAY_RCV_HTTP settings in the digital certificate manager, you have to tell it that when you call HTTPS_init(). For example:


callp https_init('POSPAY_RCV_HTTP');

Otherwise, it'll use default settings.

https_cleanup() will be run automatically by HTTPAPI when the activation group ends. If you want to call it manually, you may, but it only be necessary if you want to change profiles (i.e. run one session as POSPAY_RCV_HTTP and another as SOMETHINGELSE_RCV_HTTP).

IF you want to change profiles, you have to do this:

https_init('POSPAY_RCV_HTTP');

... make HTTP requests here....

     https_cleanup();
     https_init('SOMETHINGELSE_RCV_HTTP');

That's basically what HTTPS_cleanup() does, it un-does what https_init() did. Thus, requiring you to re-initialize SSL afterwards.


Any ideas are appreciated!



It's hard to say what the error is. DO you know if it's happening when HTTPAPI is trying to disconnect? Or when HTTPAPI is receiving data? or...?
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------