Codota Logo
IkePhase1Proposal.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.batfish.datamodel.IkePhase1Proposal
constructor

Best Java code snippets using org.batfish.datamodel.IkePhase1Proposal.<init> (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: batfish/batfish

if (initiatorProposal.isCompatibleWith(responderProposal)) {
 IkePhase1Proposal negotiatedProposal =
   new IkePhase1Proposal("~NEGOTIATED_IKE_P1_PROPOSAL~");
 negotiatedProposal.setHashingAlgorithm(initiatorProposal.getHashingAlgorithm());
 negotiatedProposal.setEncryptionAlgorithm(initiatorProposal.getEncryptionAlgorithm());
origin: batfish/batfish

static IkePhase1Proposal toIkePhase1Proposal(IsakmpPolicy isakmpPolicy) {
 IkePhase1Proposal ikePhase1Proposal = new IkePhase1Proposal(isakmpPolicy.getName().toString());
 ikePhase1Proposal.setDiffieHellmanGroup(isakmpPolicy.getDiffieHellmanGroup());
 ikePhase1Proposal.setAuthenticationMethod(isakmpPolicy.getAuthenticationMethod());
 ikePhase1Proposal.setEncryptionAlgorithm(isakmpPolicy.getEncryptionAlgorithm());
 ikePhase1Proposal.setLifetimeSeconds(isakmpPolicy.getLifetimeSeconds());
 ikePhase1Proposal.setHashingAlgorithm(isakmpPolicy.getHashAlgorithm());
 return ikePhase1Proposal;
}
origin: batfish/batfish

@Nonnull
private static IkePhase1Proposal toIkePhase1Proposal(
  String proposalName, IpsecTunnel ipsecTunnel) {
 IkePhase1Proposal ikePhase1Proposal = new IkePhase1Proposal(proposalName);
 if (ipsecTunnel.getIkePreSharedKeyHash() != null) {
  ikePhase1Proposal.setAuthenticationMethod(IkeAuthenticationMethod.PRE_SHARED_KEYS);
 }
 ikePhase1Proposal.setHashingAlgorithm(
   toIkeAuthenticationAlgorithm(ipsecTunnel.getIkeAuthProtocol()));
 ikePhase1Proposal.setDiffieHellmanGroup(
   toDiffieHellmanGroup(ipsecTunnel.getIkePerfectForwardSecrecy()));
 ikePhase1Proposal.setEncryptionAlgorithm(
   toEncryptionAlgorithm(ipsecTunnel.getIkeEncryptionProtocol()));
 return ikePhase1Proposal;
}
origin: batfish/batfish

@Test
public void testGenerateRowsIke1KeyFail() {
 // IPSecSession does not have IKE phase 1 key set
 _ipsecSessionBuilder.setNegotiatedIkeP1Proposal(new IkePhase1Proposal("test_ike_proposal"));
 _graph.putEdgeValue(
   new IpsecPeerConfigId(INITIATOR_IPSEC_PEER_CONFIG, INITIATOR_HOST_NAME),
   new IpsecPeerConfigId(RESPONDER_IPSEC_PEER_CONFIG, RESPONDER_HOST_NAME),
   _ipsecSessionBuilder.build());
 Multiset<IpsecSessionInfo> ipsecSessionInfos =
   rawAnswer(
     _networkConfigurations,
     _graph,
     ImmutableSet.of(INITIATOR_HOST_NAME),
     ImmutableSet.of(RESPONDER_HOST_NAME));
 // answer should have exactly one row
 assertThat(ipsecSessionInfos, hasSize(1));
 assertThat(
   ipsecSessionInfos.iterator().next(),
   hasIpsecSessionStatus(equalTo(IKE_PHASE1_KEY_MISMATCH)));
}
origin: batfish/batfish

@Test
public void testGenerateRowsIpsec2Fail() {
 // IPSecSession does not have IPSec phase 2 proposal set
 _ipsecSessionBuilder.setNegotiatedIkeP1Proposal(new IkePhase1Proposal("test_ike_proposal"));
 _ipsecSessionBuilder.setNegotiatedIkeP1Key(new IkePhase1Key());
 _graph.putEdgeValue(
   new IpsecPeerConfigId(INITIATOR_IPSEC_PEER_CONFIG, INITIATOR_HOST_NAME),
   new IpsecPeerConfigId(RESPONDER_IPSEC_PEER_CONFIG, RESPONDER_HOST_NAME),
   _ipsecSessionBuilder.build());
 Multiset<IpsecSessionInfo> ipsecSessionInfos =
   rawAnswer(
     _networkConfigurations,
     _graph,
     ImmutableSet.of(INITIATOR_HOST_NAME),
     ImmutableSet.of(RESPONDER_HOST_NAME));
 // answer should have exactly one row
 assertThat(ipsecSessionInfos, hasSize(1));
 assertThat(
   ipsecSessionInfos.iterator().next(), hasIpsecSessionStatus(equalTo(IPSEC_PHASE2_FAILED)));
}
origin: batfish/batfish

@Test
public void testGenerateRowsIpsecEstablished() {
 // IPSecSession has all phases negotiated and IKE phase 1 key consistent
 _ipsecSessionBuilder.setNegotiatedIkeP1Proposal(new IkePhase1Proposal("test_ike_proposal"));
 _ipsecSessionBuilder.setNegotiatedIkeP1Key(new IkePhase1Key());
 _ipsecSessionBuilder.setNegotiatedIpsecP2Proposal(new IpsecPhase2Proposal());
 _graph.putEdgeValue(
   new IpsecPeerConfigId(INITIATOR_IPSEC_PEER_CONFIG, INITIATOR_HOST_NAME),
   new IpsecPeerConfigId(RESPONDER_IPSEC_PEER_CONFIG, RESPONDER_HOST_NAME),
   _ipsecSessionBuilder.build());
 Multiset<IpsecSessionInfo> ipsecSessionInfos =
   rawAnswer(
     _networkConfigurations,
     _graph,
     ImmutableSet.of(INITIATOR_HOST_NAME),
     ImmutableSet.of(RESPONDER_HOST_NAME));
 // answer should have exactly one row
 assertThat(ipsecSessionInfos, hasSize(1));
 assertThat(
   ipsecSessionInfos.iterator().next(),
   hasIpsecSessionStatus(equalTo(IPSEC_SESSION_ESTABLISHED)));
}
origin: batfish/batfish

private IkePhase1Proposal toIkePhase1Proposal(IkeProposal ikeProposal) {
 IkePhase1Proposal ikePhase1Proposal = new IkePhase1Proposal(ikeProposal.getName());
 ikePhase1Proposal.setDiffieHellmanGroup(ikeProposal.getDiffieHellmanGroup());
 ikePhase1Proposal.setAuthenticationMethod(ikeProposal.getAuthenticationMethod());
 ikePhase1Proposal.setEncryptionAlgorithm(ikeProposal.getEncryptionAlgorithm());
 ikePhase1Proposal.setLifetimeSeconds(ikeProposal.getLifetimeSeconds());
 ikePhase1Proposal.setHashingAlgorithm(ikeProposal.getAuthenticationAlgorithm());
 return ikePhase1Proposal;
}
origin: batfish/batfish

String newIkeProposalName = ikeGroupName + ":" + ikeProposalEntry.getKey();
IkeProposal ikeProposal = ikeProposalEntry.getValue();
IkePhase1Proposal ikePhase1Proposal = new IkePhase1Proposal(newIkeProposalName);
ikePhase1Proposal.setDiffieHellmanGroup(ikeProposal.getDhGroup());
ikePhase1Proposal.setEncryptionAlgorithm(ikeProposal.getEncryptionAlgorithm());
origin: batfish/batfish

  ImmutableSortedMap.of(ikePhase1PolicyName, new IkePhase1Policy(ikePhase1PolicyName)));
config.setIkePhase1Proposals(
  ImmutableSortedMap.of(ikePhase1ProposalName, new IkePhase1Proposal(ikePhase1ProposalName)));
config.setIpAccessLists(
  ImmutableSortedMap.of(ipAccessListName, new IpAccessList(ipAccessListName)));
org.batfish.datamodelIkePhase1Proposal<init>

Popular methods of IkePhase1Proposal

  • getAuthenticationMethod
  • getDiffieHellmanGroup
  • getEncryptionAlgorithm
  • getHashingAlgorithm
  • getLifetimeSeconds
  • getName
  • setAuthenticationMethod
  • setDiffieHellmanGroup
  • setEncryptionAlgorithm
  • setHashingAlgorithm
  • setLifetimeSeconds
  • isCompatibleWith
  • setLifetimeSeconds,
  • isCompatibleWith

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Collectors (java.util.stream)
  • JFrame (javax.swing)
  • JLabel (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now