RSA Security logo

RSA BSAFE Cert-C
API Reference

cmsobj.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (c) RSA Security Inc., 1999-2003.  All rights reserved.
00003 * This work contains proprietary, confidential, and trade secret
00004 * information of RSA Security Inc.  Use, disclosure or reproduction
00005 * without the express written authorization of RSA Security Inc. is
00006 * prohibited.
00007 */
00008 
00009 #ifndef HEADER_BSAFE_CERTC_CMSOBJ 
00010 #define HEADER_BSAFE_CERTC_CMSOBJ 1
00011 
00012 #include "basetype.h"
00013 #include "cms.h"
00014 
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 
00048 /* object type */
00049 typedef POINTER C_CMS_OBJ;
00050 
00051 typedef enum {
00052   C_CMS_MSGTYPE_UNDEFINED=0,
00053   C_CMS_MSGTYPE_NONE=1,
00054   C_CMS_MSGTYPE_DATA=2,
00055   C_CMS_MSGTYPE_ENVELOPED_DATA=3,
00056   C_CMS_MSGTYPE_SIGNED_DATA=4,
00057   C_CMS_MSGTYPE_DIGESTED_DATA=5,
00058   C_CMS_MSGTYPE_ENCRYPTED_DATA=6,
00059   C_CMS_MSGTYPE_UNRECOGNIZED=7
00060 } C_CMS_MSG_TYPE;
00061 #define C_CMS_MSGTYPE_MAX 7 /* not intended for application use */
00062 
00063 typedef enum {
00064   C_CMS_VERSION_V0=1,
00065   C_CMS_VERSION_V1=2,
00066   C_CMS_VERSION_V2=3,
00067   C_CMS_VERSION_V3=4,
00068   C_CMS_VERSION_V4=5
00069 } C_CMS_VERSION;
00070 #define C_CMS_VERSION_MAX 5 /* not intended for application use */
00071 
00075 #define C_CMS_IO_FLAGS_COMPLETE 0x00000001
00076 
00096 int C_CreateCMSObject( 
00097   CERTC_CTX  ctx, 
00098   C_CMS_OBJ *pCMSObj);
00099 
00115 void C_DestroyCMSObject( 
00116   C_CMS_OBJ *pCMSObj);
00117 
00133 int C_SetCMSMessageType( 
00134   C_CMS_OBJ      cmsObj, 
00135   C_CMS_MSG_TYPE msgType);
00136 
00154 int C_GetCMSMessageType( 
00155   C_CMS_OBJ       cmsObj, 
00156   C_CMS_MSG_TYPE *pMsgType,
00157   ITEM           *pOID);
00158 
00208 int C_ReadCMSMessage( 
00209   C_CMS_OBJ      cmsObj,
00210   unsigned int   maxReadLen,
00211   unsigned char *pData,
00212   unsigned int  *pDataLen,
00213   UINT4         *pFlags);
00214 
00258 int C_WriteCMSMessage(
00259   C_CMS_OBJ     cmsObj,
00260   unsigned char *pData,
00261   unsigned int  dataLen,
00262   UINT4         flags);     /* bitfield of CMS_IO_FLAGS_* */
00263 
00296 int C_GetCMSInnerDataContentType( 
00297   C_CMS_OBJ       cmsObj, 
00298   C_CMS_MSG_TYPE *pContentType,
00299   ITEM           *pOID);
00300 
00318 int C_GetCMSRecipients( 
00319   C_CMS_OBJ  cmsObj, 
00320   LIST_OBJ  *pRecipientList);
00321 
00344 int C_AddCMSRecipient( 
00345   C_CMS_OBJ       cmsObj, 
00346   RECIPIENT_INFO *pRecipient);
00347 
00348 #ifdef __cplusplus
00349 }
00350 #endif
00351 
00352 #endif /* HEADER_BSAFE_CERTC_CMS_OBJECTS */
00353 



RSA BSAFE® Cert-C 2.7 API Reference