import edu.ucsb.eucalyptus.msgs.ImportKeyPairType;
public class KeyPairManager {
private static Logger LOG = Logger.getLogger( KeyPairManager.class );
public DescribeKeyPairsResponseType describe( DescribeKeyPairsType request ) throws Exception {
DescribeKeyPairsResponseType reply = request.getReply( );
<BUG>for ( SshKeyPair kp : Iterables.filter( KeyPairUtil.getUserKeyPairs( Contexts.lookup( ).getUserFullName( ) ), RestrictedTypes.filterPrivileged( ) ) ) {
</BUG>
if ( request.getKeySet( ).isEmpty( ) || request.getKeySet( ).contains( kp.getDisplayName( ) ) ) {
reply.getKeySet( ).add( new DescribeKeyPairsResponseItemType( kp.getDisplayName( ), kp.getFingerPrint( ) ) );
}

import edu.ucsb.eucalyptus.msgs.ImportKeyPairType;
public class KeyPairManager {
private static Logger LOG = Logger.getLogger( KeyPairManager.class );
public DescribeKeyPairsResponseType describe( DescribeKeyPairsType request ) throws Exception {
DescribeKeyPairsResponseType reply = request.getReply( );
for ( SshKeyPair kp : Iterables.filter( KeyPairs.list( Contexts.lookup( ).getUserFullName( ).asAccountFullName( ) ), RestrictedTypes.filterPrivileged( ) ) ) {
if ( request.getKeySet( ).isEmpty( ) || request.getKeySet( ).contains( kp.getDisplayName( ) ) ) {
reply.getKeySet( ).add( new DescribeKeyPairsResponseItemType( kp.getDisplayName( ), kp.getFingerPrint( ) ) );
