#include <qsossl.h>
int SSL_Write(SSLHandle *handle,
void *buffer,
int buffer_length)
The SSL_Write() function is used by a program to write data to an SSL-enabled socket descriptor.
struct SSLHandleStr { /* SSLHandleStr */
int fd; /* Socket descriptor */
int createFlags; /* SSL_Create flags value */
unsigned protocol; /* SSL protocol version */
unsigned timeout; /* Timeout value in seconds */
unsigned char cipherKind[3]; /* Current 2.0 cipher suite*/
unsigned short int cipherSuite; /* Current 3.0 cipher suite */
unsigned short int* cipherSuiteList; /* List of cipher suites */
unsigned int cipherSuiteListLen; /* Number of entries in
the cipher suites list */
unsigned char* peerCert; /* Peer certificate */
unsigned peerCertLen; /* Peer certificate length */
int peerCertValidateRc; /* Return code from
validation of certficate */
int (*exitPgm)(struct SSLHandleStr* sslh);
/* Authentication exit
program called when a
certificate is received
during SSL handshake */
};
|
No authorization is required.
SSL_Write() returns an integer. Possible values are:
Successful, where n is the number of bytes written.
SSL detected a bad state in the SSL session.
The SSL session ended.
An error occurred in SSL processing; check the errno value.
An unknown or unexpected error occurred during SSL processing.
When the SSL_Write() API fails with return code [SSL_ERROR_IO], errno can be set to to one of the following:
Descriptor not valid.
Bad address.
One of the following conditions occurred:
Interrupted function call.
Parameter not valid.
This error code indicates one of the following:
Input/output error.
There is not enough buffer space for the requested operation.
Requested operation requires a connection.
This error code indicates one of the following:
The specified descriptor does not reference a socket.
Broken pipe.
A remote host did not respond within the timeout period.
The protocol required to support the specified address family is not available at this time.
Unknown system state.
Operation would have caused the thread to be suspended.
| Message ID | Error Message Text |
|---|---|
| CPE3418 E | Possible APAR condition or hardware failure. |
| CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
| CPFA081 E | Unable to set return value or error code. |
| Top | UNIX-Type APIs | APIs by category |