lib/auth/request-pq.js
function findPublicKey(context) {
    var fingerprints = context.resPQ.server_public_key_fingerprints.getList();
    if (logger.isDebugEnabled()) {
        logger.debug('Public keys fingerprints from server: %s', fingerprints);
    }
    for (var i = 0; i < fingerprints.length; i++) {
        var fingerprint = fingerprints[i];
        if (logger.isDebugEnabled()) {
            logger.debug('Searching fingerprint %s in store', fingerprint);
        }
        var publicKey = security.PublicKey.retrieveKey(fingerprint);
        if (publicKey) {
            if (logger.isDebugEnabled()) {
                logger.debug('Fingerprint %s found in keyStore.', fingerprint);
            }
            context.fingerprint = fingerprint;
            context.publicKey = publicKey;
            return context;
        }
    }
    throw createError('Fingerprints from server not found in keyStore.', 'EFINGERNOTFOUND');
}
function findPublicKey(context) {
    var fingerprints = context.resPQ.server_public_key_fingerprints.getList();
    if (logger.isDebugEnabled()) {
        logger.debug('Public keys fingerprints from server: %s', fingerprints);
    }
    for (var i = 0; i < fingerprints.length; i++) {
        var fingerprint = fingerprints[i];
        if (logger.isDebugEnabled()) {
            logger.debug('Searching fingerprint %s in store', fingerprint);
        }
        var publicKey = security.PublicKey.retrieveKey(fingerprint);
        if (publicKey) {
            if (logger.isDebugEnabled()) {
                logger.debug('Fingerprint %s found in keyStore.', fingerprint);
            }
            context.fingerprint = fingerprint;
            context.publicKey = publicKey;
            return context;
        }
    }
    throw createError('Fingerprints from server not found in keyStore.', 'EFINGERNOTFOUND');
}
function findPublicKey ( context ) { var fingerprints = context . resPQ . server_public_key_fingerprints . getList ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( 'Public keys fingerprints from server: %s' , fingerprints ) ; } for ( var i = 0 ; i < fingerprints . length ; i ++ ) { var fingerprint = fingerprints [ i ] ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( 'Searching fingerprint %s in store' , fingerprint ) ; } var publicKey = security . PublicKey . retrieveKey ( fingerprint ) ; if ( publicKey ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( 'Fingerprint %s found in keyStore.' , fingerprint ) ; } context . fingerprint = fingerprint ; context . publicKey = publicKey ; return context ; } } throw createError ( 'Fingerprints from server not found in keyStore.' , 'EFINGERNOTFOUND' ) ; }
Find the correct Public Key using fingerprint from server response
Find the correct Public Key using fingerprint from server response