File tree 2 files changed +31
-0
lines changed
biz.aQute.bndlib/src/aQute/bnd/osgi
biz.aQute.bndlib.tests/test/test
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -2401,6 +2401,36 @@ public void testConduit() throws Exception {
2401
2401
}
2402
2402
}
2403
2403
2404
+ @ Test
2405
+ public void testSignedJarConduit () throws Exception {
2406
+ Properties p = new Properties ();
2407
+ p .setProperty ("-conduit" , "jar/osgi-3.0.0.jar" );
2408
+ Builder b = new Builder ();
2409
+ try {
2410
+ b .setProperties (p );
2411
+ Jar jars [] = b .builds ();
2412
+ assertTrue (b .check ());
2413
+ assertNotNull (jars );
2414
+ assertEquals (1 , jars .length );
2415
+
2416
+ Jar jar = jars [0 ];
2417
+ Resource r = jar .getResource ("META-INF/OSGI.RSA" );
2418
+ assertNotNull (r );
2419
+
2420
+ File f = new File ("tmp.jar" );
2421
+ f .deleteOnExit ();
2422
+ jar .write (f );
2423
+
2424
+ try (Jar wj = new Jar (f )) {
2425
+ Resource wr = wj .getResource ("META-INF/OSGI.RSA" );
2426
+ assertNotNull (wr );
2427
+ assertEquals (wj .getSHA256 (), jar .getSHA256 ());
2428
+ }
2429
+ } finally {
2430
+ b .close ();
2431
+ }
2432
+ }
2433
+
2404
2434
/**
2405
2435
* Export a package that was loaded with resources
2406
2436
*
Original file line number Diff line number Diff line change @@ -1423,6 +1423,7 @@ public Jar[] builds() throws Exception {
1423
1423
int n = 0 ;
1424
1424
for (String file : map .keySet ()) {
1425
1425
Jar c = new Jar (getFile (file ));
1426
+ c .setDoNotTouchManifest ();
1426
1427
1427
1428
buildInstrs .compression ()
1428
1429
.ifPresent (c ::setCompression );
You can’t perform that action at this time.
0 commit comments