/hg/icedtea-web: 2 new changesets
Jiri Vanek
jvanek at redhat.com
Thu May 24 06:20:12 PDT 2012
hi!
It does not look like your push have done what was described in changelogs! It looks like you have
repush my and Deepak's recent changes.... Please be very careful next time and verify your hg diff
to match *exactly* what was apporved and that nothinx nasty have not mixed in.
J.
On 05/24/2012 03:12 PM, adomurad at icedtea.classpath.org wrote:
> changeset cb6d6d2e086a in /hg/icedtea-web
> details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=cb6d6d2e086a
> author: Adam Domurad<adomurad at redhat.com>
> date: Thu May 24 09:10:41 2012 -0400
>
> Added Martin Olsson's typo fix
>
>
> changeset 43a78616b1dd in /hg/icedtea-web
> details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=43a78616b1dd
> author: Adam Domurad<adomurad at redhat.com>
> date: Thu May 24 09:12:38 2012 -0400
>
> fixing conflict in ChangeLog
>
>
> diffstat:
>
> AUTHORS | 1 +
> ChangeLog | 4 +
> netx/net/sourceforge/jnlp/resources/Messages.properties | 6 +-
> netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 89 ++++++++++-----
> netx/net/sourceforge/jnlp/security/CertificateUtils.java | 3 +-
> netx/net/sourceforge/jnlp/security/KeyStores.java | 15 ++
> plugin/icedteanp/IcedTeaNPPlugin.cc | 4 +-
> plugin/icedteanp/IcedTeaPluginUtils.cc | 4 +-
> 8 files changed, 88 insertions(+), 38 deletions(-)
>
> diffs (267 lines):
>
> diff -r 7041304bfc62 -r 43a78616b1dd AUTHORS
> --- a/AUTHORS Wed May 23 14:56:30 2012 +0200
> +++ b/AUTHORS Thu May 24 09:12:38 2012 -0400
> @@ -17,6 +17,7 @@
> Jon A. Maxwell<jmaxwell at users.sourceforge.net>
> Thomas Meyer<thomas at m3y3r.de>
> Saad Mohammad<smohammad at redhat.com>
> +Martin Olsson<martin at minimum.se>
> Andrew Su<asu at redhat.com>
> Joshua Sumali<jsumali at redhat.com>
> Jiri Vanek<jvanek at redhat.com>
> diff -r 7041304bfc62 -r 43a78616b1dd ChangeLog
> --- a/ChangeLog Wed May 23 14:56:30 2012 +0200
> +++ b/ChangeLog Thu May 24 09:12:38 2012 -0400
> @@ -1,3 +1,7 @@
> +2012-05-24 Martin Olsson<martin at minimum.se>
> + * plugin/icedteanp/IcedTeaPluginUtils.cc:
> + Fix two typos.
> +
> 2012-05-23 Jiri Vanek<jvanek at redhat.com>
>
> Enhanced about dialog
> diff -r 7041304bfc62 -r 43a78616b1dd netx/net/sourceforge/jnlp/resources/Messages.properties
> --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Wed May 23 14:56:30 2012 +0200
> +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Thu May 24 09:12:38 2012 -0400
> @@ -81,7 +81,9 @@
> LSignedAppJarUsingUnsignedJar=Signed application using unsigned jars.
> LSignedAppJarUsingUnsignedJarInfo=The main application jar is signed, but some of the jars it is using aren't.
> LSignedJNLPFileDidNotMatch=The signed JNLP file did not match the launching JNLP file.
> -
> +LNoSecInstance=Error: No security instance for {0}. The application may have trouble continuing
> +LCertFoundIn={0} found in cacerts ({1})
> +
> JNotApplet=File is not an applet.
> JNotApplication=File is not an application.
> JNotComponent=File is not a component.
> @@ -122,7 +124,7 @@
> PBadHeight=Invalid applet height.
> PUrlNotInCodebase=Relative URL does not specify a subdirectory of the codebase. (node={0}, href={1}, base={2})
> PBadRelativeUrl=Invalid relative URL (node={0}, href={1}, base={2})
> -PBadNonrelativeUrl=Invalid non-relative URL (node={0}, href={0}).
> +PBadNonrelativeUrl=Invalid non-relative URL (node={0}, href={1})
> PNeedsAttribute=The {0} element must specify a {1} attribute.
> PBadXML=Invalid XML document syntax.
> PBadHeapSize=Invalid value for heap size ({0})
> diff -r 7041304bfc62 -r 43a78616b1dd netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
> --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed May 23 14:56:30 2012 +0200
> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu May 24 09:12:38 2012 -0400
> @@ -895,44 +895,66 @@
> * Returns the permissions for the CodeSource.
> */
> protected PermissionCollection getPermissions(CodeSource cs) {
> - Permissions result = new Permissions();
> + try {
> + Permissions result = new Permissions();
>
> - // should check for extensions or boot, automatically give all
> - // access w/o security dialog once we actually check certificates.
> + // should check for extensions or boot, automatically give all
> + // access w/o security dialog once we actually check certificates.
>
> - // copy security permissions from SecurityDesc element
> - if (security != null) {
> - // Security desc. is used only to track security settings for the
> - // application. However, an application may comprise of multiple
> - // jars, and as such, security must be evaluated on a per jar basis.
> + // copy security permissions from SecurityDesc element
> + if (security != null) {
> + // Security desc. is used only to track security settings for the
> + // application. However, an application may comprise of multiple
> + // jars, and as such, security must be evaluated on a per jar basis.
>
> - // set default perms
> - PermissionCollection permissions = security.getSandBoxPermissions();
> + // set default perms
> + PermissionCollection permissions = security.getSandBoxPermissions();
>
> - // If more than default is needed:
> - // 1. Code must be signed
> - // 2. ALL or J2EE permissions must be requested (note: plugin requests ALL automatically)
> - if (cs.getCodeSigners() != null&&
> - (getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.ALL_PERMISSIONS) ||
> - getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.J2EE_PERMISSIONS))) {
> + // If more than default is needed:
> + // 1. Code must be signed
> + // 2. ALL or J2EE permissions must be requested (note: plugin requests ALL automatically)
> + if (cs == null) {
> + throw new RuntimeException("Code source was null");
> + }
> + if (cs.getLocation() == null) {
> + throw new RuntimeException("Code source location was null");
> + }
> + if (getCodeSourceSecurity(cs.getLocation()) == null) {
> + throw new RuntimeException("Code source security was null");
> + }
> + if (getCodeSourceSecurity(cs.getLocation()).getSecurityType() == null) {
> + throw new RuntimeException("Code source security type was null");
> + }
> + if (cs.getCodeSigners() != null
> +&& (getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.ALL_PERMISSIONS)
> + || getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.J2EE_PERMISSIONS))) {
>
> - permissions = getCodeSourceSecurity(cs.getLocation()).getPermissions(cs);
> + permissions = getCodeSourceSecurity(cs.getLocation()).getPermissions(cs);
> + }
> +
> + Enumeration<Permission> e = permissions.elements();
> + while (e.hasMoreElements()) {
> + result.add(e.nextElement());
> + }
> }
>
> - Enumeration<Permission> e = permissions.elements();
> - while (e.hasMoreElements())
> - result.add(e.nextElement());
> + // add in permission to read the cached JAR files
> + for (int i = 0; i< resourcePermissions.size(); i++) {
> + result.add(resourcePermissions.get(i));
> + }
> +
> + // add in the permissions that the user granted.
> + for (int i = 0; i< runtimePermissions.size(); i++) {
> + result.add(runtimePermissions.get(i));
> + }
> +
> + return result;
> + } catch (RuntimeException ex) {
> + if (JNLPRuntime.isDebug()) {
> + ex.printStackTrace();
> + }
> + throw ex;
> }
> -
> - // add in permission to read the cached JAR files
> - for (int i = 0; i< resourcePermissions.size(); i++)
> - result.add(resourcePermissions.get(i));
> -
> - // add in the permissions that the user granted.
> - for (int i = 0; i< runtimePermissions.size(); i++)
> - result.add(runtimePermissions.get(i));
> -
> - return result;
> }
>
> protected void addPermission(Permission p) {
> @@ -1732,7 +1754,12 @@
> */
>
> protected SecurityDesc getCodeSourceSecurity(URL source) {
> - return jarLocationSecurityMap.get(source);
> + SecurityDesc sec=jarLocationSecurityMap.get(source);
> + if (sec == null){
> + System.out.println(Translator.R("LNoSecInstance",source.toString()));
> + }
> + return sec;
> +
> }
>
> /**
> diff -r 7041304bfc62 -r 43a78616b1dd netx/net/sourceforge/jnlp/security/CertificateUtils.java
> --- a/netx/net/sourceforge/jnlp/security/CertificateUtils.java Wed May 23 14:56:30 2012 +0200
> +++ b/netx/net/sourceforge/jnlp/security/CertificateUtils.java Thu May 24 09:12:38 2012 -0400
> @@ -60,6 +60,7 @@
> import java.util.Random;
>
> import net.sourceforge.jnlp.runtime.JNLPRuntime;
> +import net.sourceforge.jnlp.runtime.Translator;
> import net.sourceforge.jnlp.util.replacements.BASE64Encoder;
> import sun.security.provider.X509Factory;
>
> @@ -173,7 +174,7 @@
>
> if (c.equals(keyStores[i].getCertificate(alias))) {
> if (JNLPRuntime.isDebug()) {
> - System.out.println(c.getSubjectX500Principal().getName() + " found in cacerts");
> + System.out.println(Translator.R("LCertFoundIn", c.getSubjectX500Principal().getName(), KeyStores.getPathToKeystore(keyStores[i].hashCode())));
> }
>
> return true;
> diff -r 7041304bfc62 -r 43a78616b1dd netx/net/sourceforge/jnlp/security/KeyStores.java
> --- a/netx/net/sourceforge/jnlp/security/KeyStores.java Wed May 23 14:56:30 2012 +0200
> +++ b/netx/net/sourceforge/jnlp/security/KeyStores.java Thu May 24 09:12:38 2012 -0400
> @@ -47,7 +47,9 @@
> import java.security.NoSuchAlgorithmException;
> import java.security.cert.CertificateException;
> import java.util.ArrayList;
> +import java.util.HashMap;
> import java.util.List;
> +import java.util.Map;
> import java.util.StringTokenizer;
>
> import net.sourceforge.jnlp.config.DeploymentConfiguration;
> @@ -75,6 +77,8 @@
> CLIENT_CERTS,
> }
>
> + public static final Map<Integer,String> keystoresPaths=new HashMap<Integer, String>();
> +
> private static DeploymentConfiguration config = null;
>
> private static final String KEYSTORE_TYPE = "JKS";
> @@ -133,12 +137,23 @@
> KeyStore ks = null;
> try {
> ks = createKeyStoreFromFile(new File(location), create, DEFAULT_PASSWORD);
> + //hashcode is used instead of instance so when no references are left
> + //to keystore, then this will not be blocker for garbage collection
> + keystoresPaths.put(ks.hashCode(),location);
> } catch (Exception e) {
> e.printStackTrace();
> }
> return ks;
> }
>
> + public static String getPathToKeystore(int k) {
> + String s = keystoresPaths.get(k);
> + if (s == null) {
> + return "unknown keystore location";
> + }
> + return s;
> + }
> +
> /**
> * Returns an array of KeyStore that contain certificates that are trusted.
> * The KeyStores contain certificates from different sources.
> diff -r 7041304bfc62 -r 43a78616b1dd plugin/icedteanp/IcedTeaNPPlugin.cc
> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Wed May 23 14:56:30 2012 +0200
> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Thu May 24 09:12:38 2012 -0400
> @@ -427,7 +427,7 @@
> goto cleanup_done;
>
> cleanup_appletviewer_mutex:
> - g_free (data->appletviewer_mutex);
> + g_mutex_free (data->appletviewer_mutex);
> data->appletviewer_mutex = NULL;
>
> // cleanup_instance_string:
> @@ -2000,7 +2000,7 @@
> tofree->window_width = 0;
>
> // cleanup_appletviewer_mutex:
> - g_free (tofree->appletviewer_mutex);
> + g_mutex_free (tofree->appletviewer_mutex);
> tofree->appletviewer_mutex = NULL;
>
> // cleanup_instance_string:
> diff -r 7041304bfc62 -r 43a78616b1dd plugin/icedteanp/IcedTeaPluginUtils.cc
> --- a/plugin/icedteanp/IcedTeaPluginUtils.cc Wed May 23 14:56:30 2012 +0200
> +++ b/plugin/icedteanp/IcedTeaPluginUtils.cc Thu May 24 09:12:38 2012 -0400
> @@ -289,7 +289,7 @@
> *
> * @param str The string to split
> * @param The delimiters to split on
> - * @return A string vector containing the aplit components
> + * @return A string vector containing the split components
> */
>
> std::vector<std::string*>*
> @@ -1068,7 +1068,7 @@
> if(ret)
> PLUGIN_DEBUG("Error: Unable to initialize message queue mutex: %d\n", ret);
>
> - PLUGIN_DEBUG("Mutexs %p and %p initialized\n",&subscriber_mutex,&msg_queue_mutex);
> + PLUGIN_DEBUG("Mutexes %p and %p initialized\n",&subscriber_mutex,&msg_queue_mutex);
> }
>
> /**
More information about the distro-pkg-dev
mailing list