Closed Bug 79301 Opened 25 years ago Closed 25 years ago

SSLServerSocket constructor that takes callback args

Categories

(JSS Graveyard :: Library, enhancement)

All
Windows 2000
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jamie-bugzilla, Assigned: jamie-bugzilla)

Details

SSLSocket can be constructed with a certificate approval callback. There should be a constructor for SSLServerSocket that takes this callback as an argument so servers can override the certificate approval algorithm.
Add Patrick to cc list.
Fixed. --- SSLServerSocket.java 2001/03/10 01:56:57 1.4 +++ SSLServerSocket.java 2001/06/25 21:32:06 1.5 @@ -73,6 +73,21 @@ public SSLServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException { + this(port, backlog, bindAddr, null); + } + + /** + * Creates a server socket listening on the given port. + * @param backlog The size of the socket's listen queue. + * @param bindAddr The local address to which to bind. If null, an + * unspecified local address will be bound to. + * @param certApprovalCallback Will get called to approve any certificate + * presented by the client. + */ + public SSLServerSocket(int port, int backlog, InetAddress bindAddr, + SSLCertificateApprovalCallback certApprovalCallback) + throws IOException + { // Dance the dance of fools. The superclass doesn't have a default // constructor, so we have to trick it here. This is an example // of WHY WE SHOULDN'T BE EXTENDING SERVERSOCKET. @@ -80,7 +95,8 @@ super.close(); // create the socket - sockProxy = new SocketProxy( base.socketCreate(this, null, null) ); + sockProxy = new SocketProxy( + base.socketCreate(this, certApprovalCallback, null) ); base.setProxy(sockProxy);
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.