<commit_before>/**
 * Copyright (c) Istituto Nazionale di Fisica Nucleare, 2006-2014.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.italiangrid.voms.clients;

import java.util.List;
import java.util.concurrent.TimeUnit;

import org.italiangrid.voms.clients.strategies.ProxyInitStrategy;

import eu.emi.security.authn.x509.proxy.ProxyType;

/**
 * This class represents the parameters that drive the {@link ProxyInitStrategy}
 * when creating a VOMS proxy.
 * 
 * @author <NAME>
 * 
 */
public class ProxyInitParams {

  public static final int DEFAULT_PROXY_LIFETIME = (int) TimeUnit.HOURS
    .toSeconds(12);
  public static final int DEFAULT_AC_LIFETIME = (int) TimeUnit.HOURS
    .toSeconds(12);
  public static final int DEFAULT_KEY_SIZE = 1024;

  public static final int DEFAULT_CONNECT_TIMEOUT_IN_SECONDS = 2;

  private String certFile;
  private String keyFile;

  private int keySize = DEFAULT_KEY_SIZE;

  private String trustAnchorsDir;

  private String generatedProxyFile;

  private String policyFile;

  private String policyLanguage;

  private int pathLenConstraint = Integer.MAX_VALUE;

  private ProxyType proxyType = ProxyType.LEGACY;

  private int timeoutInSeconds = DEFAULT_CONNECT_TIMEOUT_IN_SECONDS;

  private boolean verifyAC = true;

  private boolean readPasswordFromStdin = false;

  private boolean limited = false;

  private List<String> vomsCommands;

  private List<String> targets;

  private List<String> fqanOrder;

  private int proxyLifetimeInSeconds = DEFAULT_PROXY_LIFETIME;

  private int acLifetimeInSeconds = DEFAULT_AC_LIFETIME;

  private boolean validateUserCredential = false;

  private boolean noRegen = false;

  private List<String> vomsesLocations;

  private boolean enforcingChainIntegrity = true;

  private String vomsdir;

  private boolean skipHostnameChecks = true;

  /**
   * @return the certFile
   */
  public String getCertFile() {

    return certFile;
  }

  /**
   * @param certFile<commit_msg>Reenable hostname checks by default<commit_after>/**
 * Copyright (c) <NAME>, 2006-2014.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.italiangrid.voms.clients;

import java.util.List;
import java.util.concurrent.TimeUnit;

import org.italiangrid.voms.clients.strategies.ProxyInitStrategy;

import eu.emi.security.authn.x509.proxy.ProxyType;

/**
 * This class represents the parameters that drive the {@link ProxyInitStrategy}
 * when creating a VOMS proxy.
 * 
 * @author <NAME>
 * 
 */
public class ProxyInitParams {

  public static final int DEFAULT_PROXY_LIFETIME = (int) TimeUnit.HOURS
    .toSeconds(12);
  public static final int DEFAULT_AC_LIFETIME = (int) TimeUnit.HOURS
    .toSeconds(12);
  public static final int DEFAULT_KEY_SIZE = 1024;

  public static final int DEFAULT_CONNECT_TIMEOUT_IN_SECONDS = 2;

  private String certFile;
  private String keyFile;

  private int keySize = DEFAULT_KEY_SIZE;

  private String trustAnchorsDir;

  private String generatedProxyFile;

  private String policyFile;

  private String policyLanguage;

  private int pathLenConstraint = Integer.MAX_VALUE;

  private ProxyType proxyType = ProxyType.LEGACY;

  private int timeoutInSeconds = DEFAULT_CONNECT_TIMEOUT_IN_SECONDS;

  private boolean verifyAC = true;

  private boolean readPasswordFromStdin = false;

  private boolean limited = false;

  private List<String> vomsCommands;

  private List<String> targets;

  private List<String> fqanOrder;

  private int proxyLifetimeInSeconds = DEFAULT_PROXY_LIFETIME;

  private int acLifetimeInSeconds = DEFAULT_AC_LIFETIME;

  private boolean validateUserCredential = false;

  private boolean noRegen = false;

  private List<String> vomsesLocations;

  private boolean enforcingChainIntegrity = true;

  private String vomsdir;

  private boolean skipHostnameChecks = false;

  /**
   * @return the certFile
   */
  public String getCertFile() {

    return certFile;
  }

  /**
   * @param certFile
{'fraction_non_alphanumeric': 0.07114147909967845, 'fraction_numerical': 0.00964630225080386, 'mean_word_length': 4.233438485804417, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4263513', 'n_tokens_mistral': 1520, 'n_tokens_neox': 1422, 'n_words': 479}