}
private ServerAttribute getKeyAttribute( SchemaManager schemaManager, Map<EncryptionType, EncryptionKey> keys ) throws Exception
{
ServerAttribute keyAttribute =
new DefaultServerAttribute( KerberosAttribute.KRB5_KEY_AT,
schemaManager.lookupAttributeTypeRegistry( KerberosAttribute.KRB5_KEY_AT ) );
Iterator<EncryptionKey> it = keys.values().iterator();
while ( it.hasNext() )
{
try
{
keyAttribute.add( EncryptionKeyEncoder.encode( it.next() ) );
}
catch ( IOException ioe )
{
log.error( I18n.err( I18n.ERR_122 ), ioe );
}