contrib/ldns/dnssec_sign.c
static void
ldns_key_list_filter_for_dnskey(ldns_key_list *key_list)
{
	int saw_ksk = 0;
	size_t i;
	for(i=0; i<ldns_key_list_key_count(key_list); i++)
		if((ldns_key_flags(ldns_key_list_key(key_list, i))&LDNS_KEY_SEP_KEY)) {
			saw_ksk = 1;
			break;
		}
	if(!saw_ksk)
		return;
	for(i=0; i<ldns_key_list_key_count(key_list); i++)
		if(!(ldns_key_flags(ldns_key_list_key(key_list, i))&LDNS_KEY_SEP_KEY))
			ldns_key_set_use(ldns_key_list_key(key_list, i), 0);
}
/** If there are KSKs use only them and mark ZSKs unused */
If there are KSKs use only them and mark ZSKs unused
If there are KSKs use only them and mark ZSKs unused
static void
ldns_key_list_filter_for_dnskey(ldns_key_list *key_list)
{
	int saw_ksk = 0;
	size_t i;
	for(i=0; i<ldns_key_list_key_count(key_list); i++)
		if((ldns_key_flags(ldns_key_list_key(key_list, i))&LDNS_KEY_SEP_KEY)) {
			saw_ksk = 1;
			break;
		}
	if(!saw_ksk)
		return;
	for(i=0; i<ldns_key_list_key_count(key_list); i++)
		if(!(ldns_key_flags(ldns_key_list_key(key_list, i))&LDNS_KEY_SEP_KEY))
			ldns_key_set_use(ldns_key_list_key(key_list, i), 0);
}
static void ldns_key_list_filter_for_dnskey ( ldns_key_list * key_list ) { int saw_ksk = 0 ; size_t i ; for ( i = 0 ; i < ldns_key_list_key_count ( key_list ) ; i ++ ) if ( ( ldns_key_flags ( ldns_key_list_key ( key_list , i ) ) & LDNS_KEY_SEP_KEY ) ) { saw_ksk = 1 ; break ; } if ( ! saw_ksk ) return ; for ( i = 0 ; i < ldns_key_list_key_count ( key_list ) ; i ++ ) if ( ! ( ldns_key_flags ( ldns_key_list_key ( key_list , i ) ) & LDNS_KEY_SEP_KEY ) ) ldns_key_set_use ( ldns_key_list_key ( key_list , i ) , 0 ) ; }
If there are KSKs use only them and mark ZSKs unused
If there are KSKs use only them and mark ZSKs unused