if (Configuration.DEBUG)
  protected PrivateKey engineGeneratePrivate(KeySpec keySpec)      throws InvalidKeySpecException  {    log.entering(this.getClass().getName(), "engineGeneratePrivate()", keySpec);    PrivateKey result = null;    if (keySpec instanceof DSAPrivateKeySpec)      result = decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec);    else if (keySpec instanceof RSAPrivateCrtKeySpec)      result = decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);    else if (keySpec instanceof DHPrivateKeySpec)      result = decodeDHPrivateKey((DHPrivateKeySpec) keySpec);    else      {    if (! (keySpec instanceof PKCS8EncodedKeySpec))      throw new InvalidKeySpecException("Unsupported key specification");    byte[] input = ((PKCS8EncodedKeySpec) keySpec).getEncoded();        boolean ok = false;    // try DSS    try      {            result = DSSPrivateKey.valueOf(input);            ok = true;      }    catch (InvalidParameterException ignored)      {            log.log(Level.FINE, "Exception in DSSPrivateKey.valueOf(). Ignore",                    ignored);      }        if (! ok) // try RSA    try    {              result = GnuRSAPrivateKey.valueOf(input);              ok = true;    }  catch (InvalidParameterException ignored)    {              log.log(Level.FINE,                      "Exception in GnuRSAPrivateKey.valueOf(). Ignore",                      ignored);            }        if (! ok) // try DH          result = decodeDHPrivateKey(input);    }    log.exiting(this.getClass().getName(), "engineGeneratePrivate()", result);    return result;  }