01: //jTDS JDBC Driver for Microsoft SQL Server and Sybase
02: //Copyright (C) 2004 The jTDS Project
03: //
04: //This library is free software; you can redistribute it and/or
05: //modify it under the terms of the GNU Lesser General Public
06: //License as published by the Free Software Foundation; either
07: //version 2.1 of the License, or (at your option) any later version.
08: //
09: //This library is distributed in the hope that it will be useful,
10: //but WITHOUT ANY WARRANTY; without even the implied warranty of
11: //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: //Lesser General Public License for more details.
13: //
14: //You should have received a copy of the GNU Lesser General Public
15: //License along with this library; if not, write to the Free Software
16: //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: //
18: package net.sourceforge.jtds.ssl;
19:
20: /**
21: * SSL settings
22: *
23: * @author Rob Worsnop
24: * @author Mike Hutchinson
25: * @version $Id: Ssl.java,v 1.3 2005/04/20 16:49:30 alin_sinpalean Exp $
26: */
27: public interface Ssl {
28: /**
29: * SSL is not used.
30: */
31: String SSL_OFF = "off";
32: /**
33: * SSL is requested; a plain socket is used if SSL is not available.
34: */
35: String SSL_REQUEST = "request";
36: /**
37: * SSL is required; an exception if thrown if SSL is not available.
38: */
39: String SSL_REQUIRE = "require";
40: /**
41: * SSL is required and the server must return a certificate signed by a
42: * client-trusted authority.
43: */
44: String SSL_AUTHENTICATE = "authenticate";
45: /** Size of TLS record header. */
46: int TLS_HEADER_SIZE = 5;
47: /** TLS Change Cipher Spec record type. */
48: byte TYPE_CHANGECIPHERSPEC = 20;
49: /** TLS Alert record type. */
50: byte TYPE_ALERT = 21;
51: /** TLS Handshake record. */
52: byte TYPE_HANDSHAKE = 22;
53: /** TLS Application data record. */
54: byte TYPE_APPLICATIONDATA = 23;
55: /** TLS Hand shake Header Size. */
56: int HS_HEADER_SIZE = 4;
57: /** TLS Hand shake client key exchange sub type. */
58: int TYPE_CLIENTKEYEXCHANGE = 16;
59: /** TLS Hand shake client hello sub type. */
60: int TYPE_CLIENTHELLO = 1;
61:
62: }
|