HP-UX AAA Server A.08.00.01 Administrator's Guide

An A3 or A8 plug-in may include zero or one A3 algorithm. If you write a plug-in for
A3, an A8 plug-in with the same name must exist. Similarly, if you write a plug-in for
A8, an A3 plug-in with the same name must exist.
Creating A3, A8 Plug-ins
You can create a plug-in using one of the sample plug-ins as a base. The procedure and
the example described in this section use the sample_sim_a3a8.c file to create a
plug-in.
To create a plug-in using the sample_sim_a3a8.c file, which is available at /opt/
aaa/examples/sdk/sim_a3a8, complete the following steps:
1. Rename the sample_sim_a3a8.c file and open it for editing.
2. Add any header file specific to your module along with the following mandatory
header files:
#include "sdk.h"
#include "plugin.h"
#include <syslog.h>
You can also add other header files that you require.
3. Change the (a3impl and a8impl) function names in the following prototype, if
required:
static int a3impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * sres );
static int a8impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * kc );
NOTE: Changing the function names is not mandatory. However, the parameters
must not be modified.
4. Register the A3 and A8 algorithm plug-ins.
1. To modify the number of plug-ins, change the array size of plugin_array[1]
to the number of plug-ins to be written for this module.
2. Modify the plugin_load function in the following code:
sim_a3a8_plugin_info_t * sim_a3a8_info;
static const char func[] = "plugin_load";
a. Set the name of the plug-in in the following code to the required name:
sim_a3a8_info->name = "sample_sim_a3a8";
b. Set the description of the plug-in in the following code:
sim_a3a8_info->info = "Sample EAP-SIM A3/A8 algorithm plugin";
446 Customizing the HP-UX AAA Server Using the SDK