The aftp_set_security_type call specifies the type of APPC conversation security to be used. This call can only be invoked prior to the establishment of a connection to the AFTP server. When a connection is open, the APPC security type cannot be changed. If AFTP_SECURITY_PROGRAM is used for the security type, a user identifier and password must also be set using aftp_set_userid and aftp_set_password before connecting to the AFTP server.
AFTP_ENTRY aftp_set_security_type(
IN AFTP_HANDLE_TYPE connection_id,
IN AFTP_SECURITY_TYPE security_type,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR return_code
);
{
AFTP_HANDLE_TYPE connection_id;
AFTP_RETURN_CODE_TYPE aftp_rc;
/*
* Before issuing the example call, you must have:
* a connection_id, use: aftp_create()
*
* You cannot have an open connection.
*/
/*
* Set the APPC conversation security type for the
* AFTP connection.
*/
aftp_set_security_type(
connection_id,
AFTP_SECURITY_SAME,
&aftp_rc);
if (aftp_rc != AFTP_RC_OK) {
fprintf(stderr, "Error setting AFTP security type.\n");
}
}
None.