Java Code Examples for org.ietf.jgss.GSSName#equals()
The following examples show how to use
org.ietf.jgss.GSSName#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BasicKrb5Test.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 2
Source File: BasicKrb5Test.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 3
Source File: BasicKrb5Test.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 4
Source File: BasicKrb5Test.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 5
Source File: BasicKrb5Test.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 6
Source File: BasicKrb5Test.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 7
Source File: BasicKrb5Test.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 8
Source File: BasicKrb5Test.java From hottub with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 9
Source File: BasicKrb5Test.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 10
Source File: BasicKrb5Test.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 11
Source File: BasicKrb5Test.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 12
Source File: BasicKrb5Test.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }
Example 13
Source File: BasicKrb5Test.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
void go(final String server, final String backend) throws Exception { Context c, s, s2, b; c = Context.fromJAAS("client"); s = Context.fromJAAS("server"); b = Context.fromJAAS("backend"); c.startAsClient(server, GSSUtil.GSS_KRB5_MECH_OID); c.x().requestCredDeleg(true); c.x().requestConf(conf); s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); c.status(); s.status(); Context.handshake(c, s); GSSName client = c.x().getSrcName(); c.status(); s.status(); Context.transmit("i say high --", c, s); Context.transmit(" you say low", s, c); s2 = s.delegated(); s.dispose(); s = null; s2.startAsClient(backend, GSSUtil.GSS_KRB5_MECH_OID); s2.x().requestConf(conf); b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); s2.status(); b.status(); Context.handshake(s2, b); GSSName client2 = b.x().getSrcName(); if (!client.equals(client2)) { throw new Exception("Delegation failed"); } s2.status(); b.status(); Context.transmit("you say hello --", s2, b); Context.transmit(" i say goodbye", b, s2); s2.dispose(); b.dispose(); }