SSL_aor

The SSL_aor function allows the issuing entry control block (ECB) to exit and the specified program to be activated in a new ECB when data is available for reading on a shared Secure Sockets Layer (SSL) session.

Last updated

  • Changed in 2023 (information only; no code change).
  • Changed for PUT00.

Format

LIBS := CSSL                                                    
#include <openssl/ssl.h>                                        
int SSL_AOR(SSL *ssl, unsigned char *parm,                      
                      unsigned char *pgm, unsigned int istream)
ssl
A pointer to a token returned on the SSL_new call for the shared SSL session.
parm
A pointer to an 8-byte field. The 8 bytes of data are passed to the new ECB.
pgm
A pointer to a 4-byte field that contains the name of the z/TPF real-time program to activate when the new ECB is created.
istream
The I-stream number on which to activate the specified program in the new ECB. If you specify a value of 0, the tightly coupled scheduler selects the I-stream.

Normal return

Return code 1 indicates that the function was successful.

Error return

A return code equal to 0 or -1 indicates an error. The following are the most likely causes of errors:
  • The z/TPF real-time program specified for the pgm parameter does not exist.
  • The value specified for the istream parameter is not valid.
  • The value specified for the ssl parameter is not a token that represents a shared SSL session.

Programming considerations

  • To use this function, you must use the _TPF compiler option and include the library specified in the prototype in your makefile.
  • This function is unique to the z/TPF system.
  • When the specified program is activated in the new ECB, it must issue an SSL_read call. Unlike the socket activate_on_receipt function that does pass data to the new ECB, this function does not.
  • When the specified program is activated, the following ECB fields are set up:
    EBW004–EBW011
    The 8 bytes of data passed from the original ECB on the parm parameter.
    EBW016–EBW019
    The socket descriptor associated with the SSL session.
    EBW020
    The timeout flag. If this is equal to 1, the SSL_aor function timed out and no data was received.
    EBW024–EBW031
    The SSL token for this SSL session.
  • The SSL_aor function cannot be issued if an SSL_read or another SSL_aor call is pending for this SSL session.

Examples

For sample SSL applications, see SSL examples.