From: Howard Chu Date: Wed, 21 Jul 2010 22:57:01 +0000 (+0000) Subject: ITS#6595 remove unneeded token init code. From Rich Megginson @ RedHat. X-Git-Tag: MIGRATION_CVS2GIT~547 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=71f062afee9347ca7817cfd1303bc6e31f76202d;p=openldap ITS#6595 remove unneeded token init code. From Rich Megginson @ RedHat. --- diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c index a0a1233252..047aef12aa 100644 --- a/libraries/libldap/tls_m.c +++ b/libraries/libldap/tls_m.c @@ -930,26 +930,6 @@ tlsm_authenticate_to_slot( tlsm_ctx *ctx, PK11SlotInfo *slot ) return rc; } -static int -tlsm_init_tokens( tlsm_ctx *ctx ) -{ - PK11SlotList *slotList; - PK11SlotListElement *listEntry; - int rc = 0; - - slotList = PK11_GetAllTokens( CKM_INVALID_MECHANISM, PR_FALSE, PR_TRUE, NULL ); - - for ( listEntry = PK11_GetFirstSafe( slotList ); !rc && listEntry; - listEntry = PK11_GetNextSafe( slotList, listEntry, PR_FALSE ) ) { - PK11SlotInfo *slot = listEntry->slot; - rc = tlsm_authenticate_to_slot( ctx, slot ); - } - - PK11_FreeSlotList( slotList ); - - return rc; -} - static SECStatus tlsm_nss_shutdown_cb( void *appData, void *nssData ) { @@ -1365,10 +1345,6 @@ tlsm_deferred_init( void *arg ) PK11_SetPasswordFunc( tlsm_pin_prompt ); - if ( tlsm_init_tokens( ctx ) ) { - return -1; - } - /* register cleanup function */ /* delete the old one, if any */ NSS_UnregisterShutdown( tlsm_nss_shutdown_cb, NULL );