| RSA BSAFE Cert-C |
Certificate Components for C |
| Crypto-C 6.2.1 Developer's Guide | ||
| Search |
00001 /* $Id: bcert.h,v 1.6 2005/01/25 06:32:18 tjh Exp $ */ 00002 /* 00003 * Copyright (c) RSA Security Inc., 1999-2002. All rights reserved. 00004 * This work contains proprietary, confidential, and trade secret 00005 * information of RSA Security Inc. Use, disclosure or reproduction 00006 * without the express written authorization of RSA Security Inc. is 00007 * prohibited. 00008 */ 00009 00010 #ifndef _BCERT_H_ 00011 #define _BCERT_H_ 1 00012 00020 #include "certc.h" 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 extern char * CALL_CONV BCERT_VERSION; 00027 00028 /* If generating documentation then do not include the aliases for the 00029 * base structures otherwise doxygen will rename the new structure name 00030 * to the legacy BCERT name 00031 */ 00032 #ifndef DOC_PROTO 00033 00034 /* Use PKCS10_OBJ */ 00035 typedef POINTER CERT_REQUEST_OBJ; 00036 00037 /* Use PKCS10_FIELDS */ 00038 typedef PKCS10_FIELDS CERT_REQUEST_FIELDS; 00039 00040 typedef POINTER APPL_CTX; 00041 00042 #endif /* !DOC_PROTO */ 00043 00044 /* Use PKCS10_* replacements */ 00045 #define CERT_REQUEST_VERSION_1 0 00046 #define CERT_REQUEST_VERSION_2 1 /* not actually supported!! */ 00047 #define DEFAULT_CERT_REQUEST_VERSION CERT_REQUEST_VERSION_1 00048 00049 extern unsigned char ET_POLICY_CONSTRAINTS[]; 00050 #define ET_POLICY_CONSTRAINTS_LEN 3 00051 00052 /* Policy Constraints extension. This extension uses OID {id-ce 34} 00053 which has been deprecated in the X.509 specification. It was defined 00054 in an interim working document and never made it into the final 00055 standard. 00056 */ 00057 typedef struct POLICY_CONSTRAINTS { 00058 unsigned int certPolicyCount; /* number of certificate policy 00059 in certPolicies */ 00060 ITEM *certPolicies; /* points to an array of 'certPolicyCount' */ 00061 /* elements, where each element is a policy OID */ 00062 int requireExplicitPolicy; /* number of certs to skip before constraints 00063 apply. To omit, set to NOT_IN_USE */ 00064 int inhibitPolicyMapping; /* number of certs to skip before constraints 00065 apply; to omit, set to NOT_IN_USE */ 00066 } POLICY_CONSTRAINTS; 00067 00068 /* @deprecated Use C_CreatePKCS10Object(). */ 00069 int C_CreateCertRequestObject ( 00070 CERT_REQUEST_OBJ *certRequestObject);/* (out) cert req obj to be created */ 00071 00072 /* @deprecated Use C_DestroyPKCS10Object(). */ 00073 void C_DestroyCertRequestObject ( 00074 CERT_REQUEST_OBJ *certRequestObject); /* cert req obj to destroy */ 00075 00076 /* @deprecated Use C_GetPKCS10Fields(). */ 00077 int C_GetCertRequestFields ( 00078 CERT_REQUEST_OBJ certRequestObject, /* (in) cert req obj */ 00079 CERT_REQUEST_FIELDS *certRequestFields);/* (out) extracted fields */ 00080 00081 /* @deprecated Use C_SetPKCS10Fields(). */ 00082 int C_SetCertRequestFields ( 00083 CERT_REQUEST_OBJ certRequestObject, /* (mod) cert req obj */ 00084 CERT_REQUEST_FIELDS *certRequestFields);/* (in) cert req fields to set */ 00085 00086 /* @deprecated Use C_GetPKCS10DER(). */ 00087 int C_GetCertRequestDER ( 00088 CERT_REQUEST_OBJ certRequestObject, 00089 unsigned char **der, 00090 unsigned int *derLen); 00091 00092 /* @deprecated Use C_SetPKCS10BER(). */ 00093 int C_SetCertRequestBER ( 00094 CERT_REQUEST_OBJ certRequestObject, 00095 unsigned char *ber, 00096 unsigned int berLen); 00097 00098 /* @deprecated Use C_SignPKCS10(). */ 00099 int C_SignCertRequest ( 00100 CERT_REQUEST_OBJ certRequestObject, 00101 B_KEY_OBJ subjectPrivateKey, 00102 B_ALGORITHM_OBJ randomObject, 00103 int signatureAlgorithm, 00104 unsigned char *digest, 00105 unsigned int *digestLen, 00106 unsigned int maxDigestLen, 00107 A_SURRENDER_CTX *surrenderContext); 00108 00109 /* @deprecated Use C_VerifyPKCS10Signature(). */ 00110 int C_VerifyCertRequestSignature ( 00111 CERT_REQUEST_OBJ certRequestObject, 00112 unsigned char *digest, 00113 unsigned int *digestLen, 00114 unsigned int maxDigestLen, 00115 A_SURRENDER_CTX *surrenderContext); 00116 00117 /* @deprecated */ 00118 int C_DecomposePKCSCertRequestBER ( 00119 CERT_OBJ certObject, 00120 ATTRIBUTES_OBJ attributesObject, 00121 unsigned char *certRequestBER, 00122 unsigned int certRequestBERLen, 00123 unsigned char *digest, 00124 unsigned int *digestLen, 00125 A_SURRENDER_CTX *surrenderContext); 00126 00127 /* @deprecated */ 00128 int C_InitializeApplContext ( 00129 APPL_CTX *applContext); /* (out) application context */ 00130 00131 /* @deprecated */ 00132 void C_FinalizeApplContext ( 00133 APPL_CTX *applContext); /* application context */ 00134 00135 #if 0 00136 The following functions are supported via the same function definitions. 00137 The preferred method to call these functions is with a CERTC_CTX but for 00138 backward compatibility, they will take an APPL_CTX. Calling these with 00139 APPL_CTX is deprecated. 00140 00141 /* @deprecated */ 00142 int C_GetExtensionTypeInfo ( 00143 APPL_CTX applContext, /* application context */ 00144 unsigned char *type, /* extension OID */ 00145 unsigned int typeLen, /* extension OID length */ 00146 EXTENSION_TYPE_INFO *info); /* extension definition */ 00147 00148 /* @deprecated */ 00149 int C_RegisterExtensionType ( 00150 APPL_CTX applContext, /* application context */ 00151 EXTENSION_TYPE_INFO *info); /* extension definition */ 00152 00153 /* @deprecated */