Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Configuring Broker Client Security | Working with Secure Socket Layer (SSL) | Enabling SSL Authentication and Encryption | Server and Client Authentication without Encryption
 
Server and Client Authentication without Encryption
To use both server and client authentication without data encryption, follow the same procedure as in the previous example, but invoke the awSetDescriptorSSLEncrypted function before creating or reconnecting the Broker client, as shown in the following example:
. . .
static char *certfile = "certfile";
static char *password = "mypassword";
static char *trustfile = "trustfile";

BrokerConnectionDescriptor desc;
/* Create descriptor */
desc = awNewBrokerConnectionDescriptor();
if (desc == NULL) {
printf("Error on create descriptor\n");
return 0;
}

/* Enable SSL encrypton and authentication */
err = awSetDescriptorSSLCertificate(desc,certfile,password,trustfile);
if (err != AW_NO_ERROR) {
printf("Error on setting SSL
cert\n%s\n",awErrorToCompleteString(err));
return 0;
}

/* Disable encryption */
err = awSetDescriptorSSLEncrypted(desc,FALSE);
if (err != AW_NO_ERROR) {
printf("Error on setting SSL encrypt flag\n%s\n",
awErrorToCompleteString(err));
return 0;
}

/* Create a client */
. . .
}