Re: Proposed PRF changes to address Ken's comments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposed PRF changes to address Ken's comments



Nicolas Williams wrote:


- I await a reply from Seema about Ken's Java bindings question.


Comments?

Nico


To answer Ken's question :

Adding a new method to a standardized interface will break existing applications. This means all classes that implement GSSContext interface will now need to add the new method. All implementations of Java GSS will NOT compile until the new method is added.

Abstract classes don't have such a problem, since you can provide a default (possibly empty) implementation, and existing implementations will not break. It is easier to evolve an abstract class than to evolve an interface. Since GSSContext was defined to be an interface, we cannot change it.

Alternatives ?

We can possibly add the new method to GSSManager class, which is an abstract class. This class serves as a factory for three GSS interfaces: GSSName, GSSCredential, and GSSContext. The new method will have to be invoked after the GSSContext has been established.

GSSManager class:
public byte[] prf(GSSContext context, int prf_key, byte[] inBuf, int outlen)
        throws GSSException

GSSManager mgr = GSSManager.getInstance();
GSSName targetName = mgt.createName("service at host", ..);
GSSContext context = mgr.createContext(targetName, ..);
..
if (context.isEstablished()) {
  // define PRF key, input..
  int prf_key = ..
  ..
  byte[] prf_out = mgr.prf(context, prf_key, inBuf, outlen);
}

Seema



_______________________________________________
Kitten mailing list
Kitten at lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten




Note: Messages sent to this list are the opinions of the senders and do not imply endorsement by the IETF.