package com.l7tech.external.assertions.gatewaymanagement.server;

import com.l7tech.gateway.api.PrivateKeyMO;
import com.l7tech.gateway.common.security.keystore.SsgKeyEntry;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.SsgKeyHeader;
import com.l7tech.util.Option;
import com.l7tech.util.Pair;
import com.l7tech.util.Functions.UnaryThrows;

class by implements UnaryThrows<PrivateKeyMO, SsgKeyHeader, FindException> {
   final bx this$1;

   by(bx var1) {
      this.this$1 = var1;
   }

   public PrivateKeyMO call(SsgKeyHeader var1) throws FindException {
      SsgKeyEntry var2;
      try {
         var2 = this.this$1.this$0.a(new Pair(var1.getKeystoreId(), var1.getAlias()));
      } catch (ResourceFactory.ResourceNotFoundException var4) {
         throw new FindException(var4.getMessage(), var4);
      }

      return this.this$1.this$0.a(var2, Option.none());
   }
}
