All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.net.ssl.SSLPermission Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
/*

This is not an official specification document, and usage is restricted.

NOTICE


(c) 2005-2007 Sun Microsystems, Inc. All Rights Reserved.

Neither this file nor any files generated from it describe a complete specification, and they may only be used as described below. For example, no permission is given for you to incorporate this file, in whole or in part, in an implementation of a Java specification.

Sun Microsystems Inc. owns the copyright in this file and it is provided to you for informative, as opposed to normative, use. The file and any files generated from it may be used to generate other informative documentation, such as a unified set of documents of API signatures for a platform that includes technologies expressed as Java APIs. The file may also be used to produce "compilation stubs," which allow applications to be compiled and validated for such platforms.

Any work generated from this file, such as unified javadocs or compiled stub files, must be accompanied by this notice in its entirety.

This work corresponds to the API signatures of CDC Security (Java Secure Socket Extension - JSSE) Optional Package interfaces and modules. */ package javax.net.ssl; import java.security.*; import java.util.Enumeration; import java.util.Hashtable; import java.util.StringTokenizer; import java.security.Permissions; import java.lang.SecurityManager; /** * This class is for various network permissions. * An SSLPermission contains a name (also referred to as a "target name") but * no actions list; you either have the named permission * or you don't. *

* The target name is the name of the network permission (see below). The naming * convention follows the hierarchical property naming convention. * Also, an asterisk * may appear at the end of the name, following a ".", or by itself, to * signify a wildcard match. For example: "foo.*" or "*" is valid, * "*foo" or "a*b" is not valid. *

* The following table lists all the possible SSLPermission target names, * and for each provides a description of what the permission allows * and a discussion of the risks of granting code the permission. *

* *

* * * * * * * * * * * * * * * * * * *
Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
setHostnameVerifierThe ability to set a callback which can decide whether to * allow a mismatch between the host being connected to by * an HttpsURLConnection and the common name field in * server certificate. * Malicious * code can set a verifier that monitors host names visited by * HttpsURLConnection requests or that allows server certificates * with invalid common names. *
getSSLSessionContextThe ability to get the SSLSessionContext of an SSLSession. * Malicious code may monitor sessions which have been established * with SSL peers or might invalidate sessions to slow down performance. *
* * @see java.security.BasicPermission * @see java.security.Permission * @see java.security.Permissions * @see java.security.PermissionCollection * @see java.lang.SecurityManager * * @since 1.4 * @version 1.7 * @author Marianne Mueller * @author Roland Schemers */ public final class SSLPermission extends BasicPermission { /** * Creates a new SSLPermission with the specified name. * The name is the symbolic name of the SSLPermission, such as * "setDefaultAuthenticator", etc. An asterisk * may appear at the end of the name, following a ".", or by itself, to * signify a wildcard match. * * @param name the name of the SSLPermission. */ public SSLPermission(String name) { super(null); } /** * Creates a new SSLPermission object with the specified name. * The name is the symbolic name of the SSLPermission, and the * actions String is currently unused and should be null. * * @param name the name of the SSLPermission. * @param actions should be null. */ public SSLPermission(String name, String actions) { super(null, null); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy