if( keyList != NULL ) { SECKEY_DestroyPrivateKeyList(keyList); }
Java_org_mozilla_jss_pkcs11_PK11Store_putKeysInVector    (JNIEnv *env, jobject this, jobject keyVector){    PK11SlotInfo *slot;    TraversalCallbackInfo info;    PR_ASSERT(env!=NULL && this!=NULL && keyVector!=NULL);    if( JSS_PK11_getStoreSlotPtr(env, this, &slot) != PR_SUCCESS) {        ASSERT_OUTOFMEM(env);        goto finish;    }    PR_ASSERT(slot!=NULL);    info.env = env;    info.vector = keyVector;    info.type = KEY_OBJECT;    /*     * Most, if not all, tokens have to be logged in before they allow     * access to their private keys, so try to login here.  If we're already     * logged in, this is a no-op.     * If the login fails, go ahead and try to get the keys anyway, in case     * this is an exceptionally promiscuous token.     */    PK11_Authenticate(slot, PR_TRUE /*load certs*/, NULL /*wincx*/);    if( PK11_TraversePrivateKeysInSlot(slot,                                       keyTraversalCallback,                                       (void*)&info) != SECSuccess)    {        if( ! (*env)->ExceptionOccurred(env) ) {            JSS_throwMsg(env, TOKEN_EXCEPTION,                "PK11_TraverseSlot returned an error");        }        goto finish;    }finish:    return;}