18 #ifdef USE_CERTIFICATES
35 switch( certInfoPtr->
type )
40 return( &certInfoPtr->cCertVal->currentValidity->
attributes );
47 return( &certInfoPtr->cCertRev->currentRevocation->
attributes );
72 const BOOLEAN isRevocationEntry = \
73 isRevocationEntryComponent( certInfoType ) ?
TRUE :
FALSE;
82 attributePtr = findAttributeComponent( certInfoPtr, certInfoType );
83 if( attributePtr == NULL )
96 if( checkAttributeProperty( attributePtr,
103 if( checkAttributeProperty( attributePtr,
111 certInfoType,
TRUE );
112 if( fieldAttributePtr != NULL && \
113 checkAttributeProperty( fieldAttributePtr,
119 if( isRevocationEntry )
120 attributeListHeadPtrPtr = getEntryAttributeListHead( certInfoPtr );
122 attributeListHeadPtrPtr = &certInfoPtr->attributes;
123 return( deleteCompleteAttribute( attributeListHeadPtrPtr,
124 &certInfoPtr->attributeCursor, certInfoType,
125 certInfoPtr->currentSelection.dnPtr ) );
134 if( isRevocationEntry )
135 attributeListHeadPtrPtr = getEntryAttributeListHead( certInfoPtr );
137 attributeListHeadPtrPtr = &certInfoPtr->attributes;
138 status = deleteAttributeField( attributeListHeadPtrPtr,
139 &certInfoPtr->attributeCursor, attributePtr,
140 certInfoPtr->currentSelection.dnPtr );
146 certInfoPtr->currentSelection.dnPtr = NULL;
172 status = selectGeneralName( certInfoPtr, certInfoType,
178 if( deleteCompositeAttributeField( &certInfoPtr->attributes,
179 &certInfoPtr->attributeCursor, certInfoPtr->attributeCursor,
180 certInfoPtr->currentSelection.dnPtr ) ==
OK_SPECIAL )
184 certInfoPtr->currentSelection.dnPtr = NULL;
198 status = selectGeneralNameComponent( certInfoPtr, certInfoType );
200 attributePtr = certInfoPtr->attributeCursor;
204 ENSURES( attributePtr != NULL );
207 if( deleteAttributeField( &certInfoPtr->attributes,
208 &certInfoPtr->attributeCursor, attributePtr,
209 certInfoPtr->currentSelection.dnPtr ) ==
OK_SPECIAL )
213 certInfoPtr->currentSelection.dnPtr = NULL;
222 status = deleteDNComponent( certInfoPtr->currentSelection.dnPtr,
223 certInfoType, NULL, 0 );
228 if( ( certInfoType >= CRYPT_CERTINFO_FIRST_EXTENSION && \
229 certInfoType <= CRYPT_CERTINFO_LAST_EXTENSION ) || \
230 ( certInfoType >= CRYPT_CERTINFO_FIRST_CMS && \
231 certInfoType <= CRYPT_CERTINFO_LAST_CMS ) )
232 return( deleteCertAttribute( certInfoPtr, certInfoType ) );
235 switch( certInfoType )
247 if( certInfoPtr->attributeCursor == NULL )
251 status = deleteAttribute( &certInfoPtr->attributes,
252 &certInfoPtr->attributeCursor,
253 certInfoPtr->attributeCursor,
254 certInfoPtr->currentSelection.dnPtr );
262 status = deleteAttributeField( &certInfoPtr->attributes,
263 &certInfoPtr->attributeCursor,
264 certInfoPtr->attributeCursor,
265 certInfoPtr->currentSelection.dnPtr );
271 certInfoPtr->currentSelection.dnPtr = NULL;
276 if( certInfoPtr->cCertCert->trustedUsage ==
CRYPT_ERROR )
278 certInfoPtr->cCertCert->trustedUsage =
CRYPT_ERROR;
284 &certInfoPtr->objectHandle,
289 if( certInfoPtr->startTime <= 0 )
291 certInfoPtr->startTime = 0;
296 if( certInfoPtr->endTime <= 0 )
298 certInfoPtr->endTime = 0;
302 if( certInfoPtr->currentSelection.dnPtr == &certInfoPtr->subjectName )
306 certInfoPtr->currentSelection.dnPtr = NULL;
308 deleteDN( &certInfoPtr->subjectName );
314 time_t *revocationTimePtr = ( time_t * ) \
315 getRevocationTimePtr( certInfoPtr );
317 if( revocationTimePtr == NULL )
319 *revocationTimePtr = 0;