Sample Add-in Module Code

C Sample Add-in Module Code

Copyright (C) 1998 The Hewlett Packard Corporation. All rights reserved.

This file is used as an example of how to write an add-in service module for the Hewlett Packard Common Data Security Architecture (HP CDSA). This file just shows you the framework of creating a Data Storage Library (DL) and doesn’t perform any real operations. This framework can also be used to create a Certificate Library (CL) or Trust Policy Library (TP).

Hewlett Packard Company (“HP”) grants you a non-exclusive, royalty free license to use, copy, modify and distribute this source file solely for the purpose of developing application programs that utilize HP CDSA. THIS SOURCE FILE IS LICENSED “AS IS.” NO WARRANTY, EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, AS TO THE CONDITION, QUALITY, DURABILITY, PERFORMANCE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE OR USE OF THIS SOURCE FILE IS GIVEN OR ASSUMED BY HP OR ITS AGENTS AND ALL SUCH WARRANTIES ARE HEREBY EXCLUDED. HP AND ITS AGENTS SHALL IN NO EVENT BE LIABLE FOR ANY DAMAGES (INCLUDING, WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, LOST PROFITS, LOST SAVINGS OR, TO THE EXTENT ALLOWED BY APPLICABLE LAW, DAMAGES RESULTING FROM DEATH OR INJURY OF LICENSEE OR ANYONE ELSE) ARISING OUT OF OR IN CONNECTION WITH THE USE, IMPROPER USE, OR INABILITY TO USE THIS SOURCE FILE, EVEN IF HP HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

/* CSSM includes */ #include <dl.h> #include <cdsa/cssm.h> #include <cdsa/cssmspi.h> #include <stdio.h>

/* define prototype for add-in functions */

#ifdef __cplusplus extern “C” {

Appendix C

85