Date | Description |
---|---|
2012-08-20 | miniSSL V1.6
|
2008-04-17 | miniSSL V1.5
|
2004-10-01 | miniSSL V1.4
|
2001-02-18 | updated miniSSL V1.3:
|
2000-11-15 | updated miniSSL V1.2: improved handling of closure alerts. |
2000-11-13 | released miniSSL V1.1 (bugfix) |
2000-09-05 | first public release of miniSSL 1.0 |
/****************************************************************************** * $Source: /export/CVS/bebbo/www.bebbosoft.de/tools/minissl/index.wiki,v $ * $Revision: 1.15 $ * $Date: 2012/08/23 05:30:52 $ * $Author: bebbo $ * $Locker: $ * $State: Exp $ * * Copyright (c) by Stefan Bebbo Franke 1999-2000. * All rights reserved * * test for SslClient * * Based on http://home.netscape.com/eng/ssl3/draft302.txt *****************************************************************************/ import de.bb.minissl.*; import java.net.*; import java.io.*; public class Client { /** * create a client connection to some server */ public static void main(String args[]) { System.out.println("SSL Client Demo $Revision: 1.15 $"); int port = 443; switch (args.length) { case 2: port = Integer.parseInt(args[1]); case 1: break; default: System.out.println("usage: Client &91;=80]"); return; } String ip = args[0]; try { System.out.println("connecting to: " + ip + ":" + port); Socket socket = new Socket(ip, port); Ssl3Client ssl = new Ssl3Client(socket.getInputStream(), socket.getOutputStream()); System.out.println("using ciphertype " + ssl.getCipherType()); InputStream is = ssl.getInputStream(); OutputStream os = ssl.getOutputStream(); // now use the streams ... os.write("GET / HTTP/1.0\r\n\r\n".getBytes() ); ByteArrayOutputStream bos = new ByteArrayOutputStream(); for (int i = is.read(); i >= 0; i = is.read()) bos.write(i); System.out.println(bos.toString()); } catch (IOException e) { System.out.println(e.toString()); } } } /* * Revision 1.1 2000/09/25 12:21:10 bebbo * @N repackaged */