84 char userFileName[ 16 + 8 ];
94 strlcpy_s( userFileName, 16,
"cryptlib" );
98 userInfoPtr->userFileInfo.fileRef );
102 status = getConfigDisposition( userInfoPtr->configOptions,
103 userInfoPtr->configOptionsCount,
104 userInfoPtr->trustInfoPtr,
108 switch( disposition )
116 return( deleteConfig( userFileName ) );
121 if( !userInfoPtr->trustInfoChanged )
125 iTrustedCertUserObject = userInfoPtr->objectHandle;
131 status = prepareConfigData( userInfoPtr->configOptions,
132 userInfoPtr->configOptionsCount,
140 iTrustedCertUserObject = userInfoPtr->objectHandle;
153 status = krnlSuspendObject( userInfoPtr->objectHandle, &refCount );
155 commitStatus = commitConfigData( userFileName, data, length,
156 iTrustedCertUserObject );
159 clFree(
"userMessageFunction", data );
173 userInfoPtr->trustInfoChanged =
FALSE;
175 return( commitStatus );
182 const CRYPT_USER iCryptUser = userInfoPtr->objectHandle;
204 status = krnlSuspendObject( iCryptUser, &refCount );
212 return( setOptionSpecial( userInfoPtr->configOptions,
213 userInfoPtr->configOptionsCount,
235 assert(
isWritePtr( valuePtr,
sizeof(
int ) ) );
254 return( exitErrorNotFound( userInfoPtr, attribute ) );
265 CRYPT_IATTRIBUTE_CERTCOPY );
271 #ifdef USE_CERTIFICATES
272 case CRYPT_IATTRIBUTE_CTL:
277 if( !trustedCertsPresent( userInfoPtr->trustInfoPtr ) )
308 return( getOption( userInfoPtr->configOptions,
309 userInfoPtr->configOptionsCount, attribute,
334 status = getOptionString( userInfoPtr->configOptions,
335 userInfoPtr->configOptionsCount, attribute,
336 &
string, &stringLen );
339 return( attributeCopy( msgData,
string, stringLen ) );
359 REQUIRES( ( attribute == CRYPT_IATTRUBUTE_CERTKEYSET && \
371 const int requiredKeyUsage = \
381 return( exitErrorInited( userInfoPtr, attribute ) );
417 !( attributeValue & requiredKeyUsage ) )
430 case CRYPT_IATTRUBUTE_CERTKEYSET:
434 return( trustedCertsPresent( userInfoPtr->trustInfoPtr ) ? \
442 #ifdef USE_CERTIFICATES
443 case CRYPT_IATTRIBUTE_CTL:
446 value, NULL, 0,
FALSE );
448 userInfoPtr->trustInfoChanged =
TRUE;
459 status = setOption( userInfoPtr->configOptions,
460 userInfoPtr->configOptionsCount, attribute, value );
472 return( twoPhaseConfigUpdate( userInfoPtr, value ) );
473 return( twoPhaseSelftest( userInfoPtr, value ) );
494 return( setUserPassword( userInfoPtr, data, dataLength ) );
500 return( setOptionString( userInfoPtr->configOptions,
501 userInfoPtr->configOptionsCount, attribute,
502 data, dataLength ) );
534 return( deleteOption( userInfoPtr->configOptions,
535 userInfoPtr->configOptionsCount, attribute ) );