KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > net > ssl > SSLPermission


1 /*
2  * @(#)SSLPermission.java 1.9 04/02/16
3  *
4  * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7   
8 /*
9  * NOTE:
10  * Because of various external restrictions (i.e. US export
11  * regulations, etc.), the actual source code can not be provided
12  * at this time. This file represents the skeleton of the source
13  * file, so that javadocs of the API can be created.
14  */

15
16 package javax.net.ssl;
17
18 import java.security.*;
19
20 import java.util.Enumeration;
21 import java.util.Hashtable;
22 import java.util.StringTokenizer;
23 import java.security.Permissions;
24 import java.lang.SecurityManager;
25
26 /**
27  * This class is for various network permissions.
28  * An SSLPermission contains a name (also referred to as a "target name") but
29  * no actions list; you either have the named permission
30  * or you don't.
31  * <P>
32  * The target name is the name of the network permission (see below). The naming
33  * convention follows the hierarchical property naming convention.
34  * Also, an asterisk
35  * may appear at the end of the name, following a ".", or by itself, to
36  * signify a wildcard match. For example: "foo.*" or "*" is valid,
37  * "*foo" or "a*b" is not valid.
38  * <P>
39  * The following table lists all the possible SSLPermission target names,
40  * and for each provides a description of what the permission allows
41  * and a discussion of the risks of granting code the permission.
42  * <P>
43  *
44  * <table border=1 cellpadding=5
45  * summary="permission name, what it allows, and associated risks">
46  * <tr>
47  * <th>Permission Target Name</th>
48  * <th>What the Permission Allows</th>
49  * <th>Risks of Allowing this Permission</th>
50  * </tr>
51  *
52  * <tr>
53  * <td>setHostnameVerifier</td>
54  * <td>The ability to set a callback which can decide whether to
55  * allow a mismatch between the host being connected to by
56  * an HttpsURLConnection and the common name field in
57  * server certificate.
58  * </td>
59  * <td>Malicious
60  * code can set a verifier that monitors host names visited by
61  * HttpsURLConnection requests or that allows server certificates
62  * with invalid common names.
63  * </td>
64  * </tr>
65  *
66  * <tr>
67  * <td>getSSLSessionContext</td>
68  * <td>The ability to get the SSLSessionContext of an SSLSession.
69  * </td>
70  * <td>Malicious code may monitor sessions which have been established
71  * with SSL peers or might invalidate sessions to slow down performance.
72  * </td>
73  * </tr>
74  *
75  * </table>
76  *
77  * @see java.security.BasicPermission
78  * @see java.security.Permission
79  * @see java.security.Permissions
80  * @see java.security.PermissionCollection
81  * @see java.lang.SecurityManager
82  *
83  * @since 1.4
84  * @version 1.9
85  * @author Marianne Mueller
86  * @author Roland Schemers
87  */

88 public final class SSLPermission extends BasicPermission
89 {
90
91     /**
92      * Creates a new SSLPermission with the specified name.
93      * The name is the symbolic name of the SSLPermission, such as
94      * "setDefaultAuthenticator", etc. An asterisk
95      * may appear at the end of the name, following a ".", or by itself, to
96      * signify a wildcard match.
97      *
98      * @param name the name of the SSLPermission.
99      */

100     public SSLPermission(String name) { }
101
102     /**
103      * Creates a new SSLPermission object with the specified name.
104      * The name is the symbolic name of the SSLPermission, and the
105      * actions String is currently unused and should be null.
106      *
107      * @param name the name of the SSLPermission.
108      * @param actions should be null.
109      */

110     public SSLPermission(String name, String actions) { }
111 }
112
Popular Tags