You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2006/08/24 14:39:47 UTC
svn commit: r434386 [2/2] - in
/incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework:
./ cache/
Modified: incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java?rev=434386&r1=434385&r2=434386&view=diff
==============================================================================
--- incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java (original)
+++ incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java Thu Aug 24 05:39:46 2006
@@ -20,9 +20,9 @@
import java.net.URL;
import java.net.URLConnection;
import java.security.PrivilegedActionException;
-import java.util.Map;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
+import java.security.cert.X509Certificate;
+import java.util.*;
+import java.util.jar.*;
import java.util.zip.ZipEntry;
import org.apache.felix.framework.Logger;
@@ -50,7 +50,7 @@
private Map m_header = null;
public JarRevision(
- Logger logger, File revisionRootDir, String location, boolean byReference)
+ Logger logger, File revisionRootDir, String location, boolean byReference)
throws Exception
{
this(logger, revisionRootDir, location, byReference, null);
@@ -58,7 +58,7 @@
public JarRevision(
Logger logger, File revisionRootDir, String location,
- boolean byReference, InputStream is)
+ boolean byReference, InputStream is)
throws Exception
{
super(logger, revisionRootDir, location);
@@ -168,7 +168,7 @@
}
}
}
-
+
// If there is nothing on the class path, then include
// "." by default, as per the spec.
if (contentPath.length == 0)
@@ -272,11 +272,11 @@
{
if (is == null)
{
- // Do it the manual way to have a chance to
+ // Do it the manual way to have a chance to
// set request properties such as proxy auth.
URL url = new URL(getLocation());
- URLConnection conn = url.openConnection();
-
+ URLConnection conn = url.openConnection();
+
// Support for http proxy authentication.
String auth = BundleCache.getSecureAction()
.getSystemProperty("http.proxyAuth", null);
@@ -292,7 +292,7 @@
}
is = BundleCache.getSecureAction().getURLConnectionInputStream(conn);
}
-
+
// Save the bundle jar file.
BundleCache.copyStreamToFile(is, m_bundleFile);
}
@@ -421,7 +421,7 @@
throw new IOException("Unable to create embedded JAR directory.");
}
}
-
+
// Extract embedded JAR into its directory.
is = new BufferedInputStream(bundleJar.getInputStream(ze), BundleCache.BUFSIZE);
if (is == null)
@@ -438,5 +438,10 @@
if (is != null) is.close();
}
}
+ }
+
+ protected X509Certificate[] getRevisionCertificates() throws Exception
+ {
+ return getCertificatesForJar(BundleCache.getSecureAction().openJAR(m_bundleFile, true));
}
}
Modified: incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/SystemBundleArchive.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/SystemBundleArchive.java?rev=434386&r1=434385&r2=434386&view=diff
==============================================================================
--- incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/SystemBundleArchive.java (original)
+++ incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/SystemBundleArchive.java Thu Aug 24 05:39:46 2006
@@ -18,6 +18,7 @@
import java.io.File;
import java.io.InputStream;
+import java.security.cert.X509Certificate;
import java.util.Map;
import org.apache.felix.framework.util.FelixConstants;
@@ -65,6 +66,11 @@
public void dispose() throws Exception
{
}
+
+ protected X509Certificate[] getRevisionCertificates()
+ {
+ return null;
+ }
};
}
@@ -148,7 +154,7 @@
{
return m_headerMap;
}
-
+
public void setManifestHeader(Map headerMap)
{
m_headerMap = headerMap;