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 Authentication with Encryption
 
Server Authentication with Encryption
To use server authentication with data encryption (One-way SSL), invoke the awSetDescriptorSSLCertificate function with a NULL certificate file and certificate file password, and a valid truststore file. Then create or reconnect the Broker client, as shown in the following example:
. . .
static char *certfile = "NULL"; //NULL certificate file
static char *password = "NULL"; //NULL certificate file password
static char *trustfile = "trustfilepath";

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

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