DBT checkKey; DBT checkData;
seckey_HasAServerKey(DB *db){    DBT checkKey;    DBT checkData;    DBT key;    DBT data;    int ret;    PRBool found = PR_FALSE;    ret = (* db->seq)(db, &key, &data, R_FIRST);    if ( ret ) {	return PR_FALSE;    }        do {	/* skip version record */	if ( data.size > 1 ) {	    /* skip salt */	    if ( key.size == ( sizeof(SALT_STRING) - 1 ) ) {		if ( PORT_Memcmp(key.data, SALT_STRING, key.size) == 0 ) {		    continue;		}	    }	    /* skip pw check entry */	    if ( key.size == KEYDB_PW_CHECK_LEN ) {		if ( PORT_Memcmp(key.data, KEYDB_PW_CHECK_STRING, 						KEYDB_PW_CHECK_LEN) == 0 ) {		    continue;		}	    }	    /* keys stored by nickname will have 0 as the last byte of the	     * db key.  Other keys must be stored by modulus.  We will not	     * update those because they are left over from a keygen that	     * never resulted in a cert.	     */	    if ( ((unsigned char *)key.data)[key.size-1] != 0 ) {		continue;	    }	    if (PORT_Strcmp(key.data,"Server-Key") == 0) {		found = PR_TRUE;	        break;	    }	    	}    } while ( (* db->seq)(db, &key, &data, R_NEXT) == 0 );    return found;}