Broker 10.15 | 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-side Authentication with Encryption
 
Server and Client-side Authentication with Encryption
To use both server and client authentication with data encryption, invoke the awSetDescriptorSSLCertificate function with a valid certificate file, certificate file password, and a valid truststore file, 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 both Server and client 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;
}
/* Create a client */
. . .
}