RSA Security logo

RSA BSAFE Cert-C
API Reference

pkistinf.h

Go to the documentation of this file.
00001 /*
00002 ** Copyright (c) 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 
00020 #ifndef _PKISTINF_H_
00021 #define _PKISTINF_H_
00022 
00023 #include "basetype.h"
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 /* values for status in PKI_STATUS_INFO and PKI_STATUS_INFO_OBJ */
00030 #define PKI_STATUS_GRANTED            0
00031 #define PKI_STATUS_GRANTED_MODS       1
00032 #define PKI_STATUS_REJECTED           2
00033 #define PKI_STATUS_WAITING            3
00034 #define PKI_STATUS_WARNING_REVOCATION 4
00035 #define PKI_STATUS_REVOCATION         5
00036 #define PKI_STATUS_WARNING_KEY_UPDATE 6
00037 
00038 /* values for failInfo in PKI_STATUS_INFO and PKI_STATUS_INFO_OBJ */
00039 #define PKI_FAIL_BAD_ALG                0x00000001
00040 #define PKI_FAIL_BAD_MESSAGE_CHECK      0x00000002
00041 #define PKI_FAIL_BAD_REQUEST            0x00000004
00042 #define PKI_FAIL_BAD_TIME               0x00000008
00043 #define PKI_FAIL_BAD_CERT_ID            0x00000010
00044 #define PKI_FAIL_BAD_DATA_FORMAT        0x00000020
00045 #define PKI_FAIL_WRONG_AUTHORITY        0x00000040
00046 #define PKI_FAIL_INCORRECT_DATA         0x00000080
00047 #define PKI_FAIL_MISSING_TIMESTAMP      0x00000100
00048 #define PKI_FAIL_BAD_POP                0x00000200
00049 #define PKI_FAIL_CERT_REVOKED           0x00000400
00050 #define PKI_FAIL_CERT_CONFIRMED         0x00000800
00051 #define PKI_FAIL_WRONG_INTEGRITY        0x00001000
00052 #define PKI_FAIL_BAD_RECIPIENT_NONCE    0x00002000
00053 #define PKI_FAIL_TIME_NOT_AVALIABLE     0x00004000
00054 #define PKI_FAIL_UNACCEPTED_POLICY      0x00008000
00055 #define PKI_FAIL_UNACCEPTED_EXTENSION   0x00010000
00056 #define PKI_FAIL_ADD_INFO_NOT_AVAILABLE 0x00020000
00057 #define PKI_FAIL_BAD_SENDER_NONCE       0x00040000
00058 #define PKI_FAIL_BAD_CERT_TEMPLATE      0x00080000
00059 #define PKI_FAIL_SIGNER_NOT_TRUSTED     0x00100000
00060 #define PKI_FAIL_TRANSACTION_ID_IN_USE  0x00200000
00061 #define PKI_FAIL_UNSUPPORTED_VERSION    0x00400000
00062 #define PKI_FAIL_NOT_AUTHORIZED         0x00800000
00063 #define PKI_FAIL_SYSTEM_UNAVAIL         0x01000000
00064 #define PKI_FAIL_SYSTEM_FAILURE         0x02000000
00065 #define PKI_FAIL_DUPLICATE_CERTREQ      0x04000000
00066 #define PKI_FAIL_SERVER_ERROR           0x40000000
00067 #define PKI_FAIL_REMOTE_SERVER_ERROR    0x80000000
00068 
00121 typedef POINTER PKI_STATUS_INFO_OBJ;
00122 
00135 int C_CreatePKIStatusInfoObject(
00136   CERTC_CTX               ctx,                /* (in)  Cert-C context */
00137   PKI_STATUS_INFO_OBJ    *pPkiStatusInfoObj); /* (mod) pki status info object */
00138 
00148 void C_DestroyPKIStatusInfoObject(
00149   PKI_STATUS_INFO_OBJ    *pPkiStatusInfoObj); /* (mod) pki status info object */
00150 
00151 /*
00152  * The following set/get APIs are able to act on either
00153  * PKI_STATUS_INFO_OBJ or PKI_ERROR_MSG_OBJ
00154  */
00194 int C_SetPKIStatus (
00195   POINTER                 pkiObj,             /* (mod) pki object*/
00196   unsigned int            pkiStatus);         /* (in) one of PKI_STATUS_* */
00197 
00198 /* Gets pki status from a PKI Status Info Object. */int C_GetPKIStatus (
00238   POINTER                 pkiObj,             /* (mod) pki object*/
00239   unsigned int           *pPkiStatus);        /* (out) one of PKI_STATUS_* */
00240 
00241 /* Sets pki fail info into a PKI Status Info Object. */
00334 int C_SetPKIFailInfo (
00335   POINTER                 pkiObj,             /* (mod) pki object*/
00336   unsigned int            pkiFailInfo);       /* (in) one of PKI_STATUS_* */
00337 
00338 /* Gets pki fail from a PKI Status Info Object. */
00433 int C_GetPKIFailInfo (
00434   POINTER                 pkiObj,             /* (mod) pki object*/
00435   unsigned int           *pPkiFailInfo);      /* (out) one of PKI_FAIL_* */
00436 
00437 /* Sets pki status string into a PKI Status Info Object. */
00453 int C_SetPKIStatusString (
00454   POINTER                 pkiObj,             /* (mod) pki object*/
00455   LIST_OBJ                statusStringList);  /* (in) list of UTF8 strings  */
00456 
00457 /* Gets pki status string from a PKI Status Info Object. */
00476 int C_GetPKIStatusString (
00477   POINTER                 pkiObj,             /* (mod) pki object*/
00478   LIST_OBJ               *pStatusStringList); /* (out) list of UTF8 strings  */
00479 
00480 /* Sets pki fail info aux from a PKI Status Info Object. */
00497 int C_SetPKIFailInfoAux (
00498   POINTER                 pkiObj,             /* (mod) pki object*/
00499   unsigned int            failInfoAux);       /* (in) detailed, SP-specific failure code */
00500 
00501 /* Gets pki fail info aux from a PKI Status Info Object. */
00518 int C_GetPKIFailInfoAux (
00519   POINTER                 pkiObj,             /* (mod) pki object*/
00520   unsigned int           *pFailInfoAux);      /* (out) detailed, SP-specific failure code */
00521 
00522 /*
00523  * DEPRECATED
00524  */
00525 /* General PKI response status */
00638 typedef struct {
00639   unsigned int      status;        /* one of PKI_STATUS_* above          */
00640   unsigned int      failInfo;      /* one of PKI_FAIL_* above            */
00641   LIST_OBJ          statusString;  /* list of UTF8 strings               */
00642   unsigned int      failInfoAux;   /* detailed, SP-specific failure code */
00643 } PKI_STATUS_INFO;
00644 /*
00645  * DEPRECATION end
00646  */
00647 
00648 #ifdef __cplusplus
00649 }
00650 #endif
00651 
00652 #endif /* _PKISTINF_H_ */
00653 



RSA BSAFE® Cert-C 2.7 API Reference