Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: cce480e7de8b9f6614cd241549006a38ab3d4ff7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*******************************************************************************
 *  Copyright (c) 2007, 2017 IBM Corporation and others.
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 * 
 *  Contributors:
 *     IBM - Initial API and implementation
 *******************************************************************************/
package org.eclipse.equinox.internal.p2.jarprocessor.unsigner;

import java.io.File;
import java.util.List;
import java.util.Properties;
import org.eclipse.equinox.internal.p2.jarprocessor.SignCommandStep;

public class UnsignCommand extends SignCommandStep {

	public UnsignCommand(Properties options, String command, boolean verbose) {
		super(options, command, verbose);
	}

	@Override
	public File postProcess(File input, File workingDirectory, List<Properties> containers) {
		if (command != null && input != null && shouldSign(input, containers)) {
			execute(input);
		}
		return null;
	}

	private void execute(File input) {
		Unsigner jarUnsigner = new Unsigner();
		jarUnsigner.setJar(input);
		jarUnsigner.setKeepManifestEntries(false);
		jarUnsigner.execute();
	}
}

Back to the top