classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] [RFC] JSSE 1.5 classes and methods


From: Casey Marshall
Subject: [cp-patches] [RFC] JSSE 1.5 classes and methods
Date: Mon, 12 Sep 2005 22:33:12 -0700

Hi,

Attached is a patch to implement most of the javax.net.ssl methods and classes introduced in J2SE 1.5.

This isn't complete, partly due to missing classes elsewhere (java.security.KeyStore.Builder) and due to the introduction of two enums. To work around the latter, I've created a 'PseudoEnum' class that mostly matches 'Enum,' and extend that for the enums in the JSSE API.

I'm looking for comments about this approach, since I imagine it is controversial; this looks closely compatible with 1.5, according to japicompat, but I'm not sure if that level of compatibility is close enough. There are a couple alternatives to a new class under 'gnu':

  - Implement a pre-1.5 java.lang.Enum, and use that.
- Don't use any superclass, and treat the two enums as one-off types that contain all the methods they currently inherit from the superclass.

My reason for doing this is to introduce NIO support in Jessie (http://jessie.nongnu.org/), and to eventually see projects like gumdrop (http://gumdrop.nongnu.org/) have SSL support through Jessie, on existing Classpath runtimes.

2005-09-12  Casey Marshall  <address@hidden>

    * gnu/java/lang/PseudoEnum.java: new file.
    * javax/net/ssl/CertPathTrustManagerParameters.java: new file.
    * javax/net/ssl/HandshakeCompletedEvent.java
    (getLocalPrincipal, getPeerPrincipal): new methods.
    * javax/net/ssl/HttpsURLConnection.java
    (<init>): don't declare to throw IOException.
    (getLocalPrincipal, getPeerPrincipal): new methods.
    * javax/net/ssl/KeyStoreBuilderParameters.java: new file.
    * javax/net/ssl/SSLContext.java (createSSLEngine,
      createSSLEngine): new methods.
    * javax/net/ssl/SSLContextSpi.java (engineCreateSSLEngine,
      engineCreateSSLEngine): new methods.
    * javax/net/ssl/SSLEngine.java: new file.
    * javax/net/ssl/SSLEngineResult.java: new file.
* javax/net/ssl/SSLException.java (<init>, <init>): new constructors.
    * javax/net/ssl/SSLSession.java (getApplicationBufferSize,
getLocalPrincipal, getPacketBufferSize, getPeerPort, getPeerPrincipal,
      isValid): new methods.
    * javax/net/ssl/X509ExtendedKeyManager.java: new file.

Cheers.

Attachment: jsse-new.patch.txt
Description: Text document

Attachment: jsse.patch.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]