RSA Security logo

RSA BSAFE Cert-C
API Reference

pkictmsg.h

Go to the documentation of this file.
00001 /*  
00002 ** Copyright (c) 1999-2002, RSA Security Inc.
00003 **
00004 ** This file is used to demonstrate how to interface to an RSA
00005 ** Security licensed development product.  You have a
00006 ** royalty-free right to use, modify, reproduce and distribute this
00007 ** demonstration file (including any modified version), provided that
00008 ** you agree that RSA Security has no warranty, implied or
00009 ** otherwise, or liability for this demonstration file or any modified
00010 ** version.
00011 **
00012 */
00013 
00019 #ifndef PKI_CERT_TEMPLATE_H
00020 #define PKI_CERT_TEMPLATE_H
00021 
00022 #include "basetype.h"
00023 #include "bsafe.h"
00024 #include "certext.h"
00025 #include "certapi.h"
00026 #include "certalg.h"
00027 #include "pkistinf.h"
00028 #include "pkimsg.h"
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00109 typedef POINTER PKI_CERT_TEMPLATE_OBJ;  /* handle to PKI certificate template object */
00110 
00123 int C_CreatePKICertTemplateObject ( 
00124   CERTC_CTX             ctx,                /* (in) Cert-C context */
00125   PKI_CERT_TEMPLATE_OBJ *pPKICertTmplObj);  /* (mod) cert template Object */
00126 
00135 void C_DestroyPKICertTemplateObject ( 
00136   PKI_CERT_TEMPLATE_OBJ *pPKICertTmplObj);  /* (mod) cert template Object */
00137 
00151 int C_GetPKICertTemplateFromCertObject(
00152   CERT_OBJ              certobj,            /* (in) cert object */
00153   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj);    /* (mod) cert template object */
00154 
00168 int C_SetCertTemplateVersion (
00169   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00170   UINT2                 version);           /* (in) version of the cert templateed */
00171 
00185 int C_GetCertTemplateVersion (
00186   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00187   UINT2                 *pVersion);         /* (out) version of the cert templateed */
00188 
00202 int C_SetCertTemplateSerialNumber ( 
00203   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00204   ITEM                  *pSerialNumber);    /* (in) serial number */
00205 
00219 int C_GetCertTemplateSerialNumber ( 
00220   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00221   ITEM                  *pSerialNumber);    /* (out) serial number */
00222 
00244 int C_SetCertTemplateSignatureAlgorithm ( 
00245   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00246   int                   signatureAlgorithm);/* (in) sign algo */
00247 
00262 int C_GetCertTemplateSignatureAlgorithm (
00263   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,       /* (in) cert template object */
00264   int                   *pSignatureAlgorithm);/* (out) sign algo */
00265 
00280 int C_SetCertTemplateIssuerName ( 
00281   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00282   NAME_OBJ              issuerName);        /* (in) issuerName */
00283 
00298 int C_GetCertTemplateIssuerName ( 
00299   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00300   NAME_OBJ              *pIssuerName);      /* (out) issuerName */
00301 
00315 int C_SetCertTemplateValidityStart ( 
00316   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00317   UINT4                 start);             /* (in) start of validity */
00318 
00332 int C_SetCertTemplateValidityEnd ( 
00333   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00334   UINT4                 end);               /* (in) end of validity */
00335 
00349 int C_GetCertTemplateValidityStart ( 
00350   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00351   UINT4                 *pStart);           /* (out) start of validity */
00352 
00366 int C_GetCertTemplateValidityEnd ( 
00367   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00368   UINT4                 *pEnd);             /* (out) end of validity */
00369 
00383 int C_SetCertTemplateSubjectName ( 
00384   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00385   NAME_OBJ              subjectName);       /* (in) subjectName */
00386 
00400 int C_GetCertTemplateSubjectName ( 
00401   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00402   NAME_OBJ              *pSubjectName);     /* (out) subjectName */
00403 
00417 int C_SetCertTemplatePublicKey ( 
00418   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00419   ITEM                  *pPubKey);          /* (in) public key */
00420 
00434 int C_GetCertTemplatePublicKey ( 
00435   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00436   ITEM                  *pPubKey);          /* (out) public key */
00437 
00457 int C_SetCertTemplateIssuerUniqueID ( 
00458   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00459   BIT_STRING            *pIssuerID);        /* (in) issuer ID */
00460 
00479 int C_GetCertTemplateIssuerUniqueID ( 
00480   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00481   BIT_STRING            *pIssuerID);        /* (out) issuer ID */
00482 
00497 int C_SetCertTemplateSubjectUniqueID ( 
00498   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00499   BIT_STRING            *pSubjectID);       /* (in) subject ID */
00500 
00515 int C_GetCertTemplateSubjectUniqueID ( 
00516   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00517   BIT_STRING            *pSubjectID);       /* (out) subject ID */
00518 
00533 int C_SetCertTemplateExtensions ( 
00534   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (mod) cert template object */
00535   EXTENSIONS_OBJ        extensions);        /* (in) cert extensions */
00536 
00551 int C_GetCertTemplateExtensions ( 
00552   PKI_CERT_TEMPLATE_OBJ PKICertTmplObj,     /* (in) cert template object */
00553   EXTENSIONS_OBJ        *pExtensions);      /* (out) cert extensions */
00554 
00555 #ifdef __cplusplus
00556 }
00557 #endif
00558 
00559 #endif /* PKI_CERT_TEMPLATE_H */



RSA BSAFE® Cert-C 2.7 API Reference