mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8076535: Deprecate the com.sun.jarsigner package
Reviewed-by: mullan
This commit is contained in:
parent
57abe9b399
commit
d7cf775ca7
6 changed files with 28 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,9 +35,11 @@ import java.security.cert.CertificateException;
|
||||||
*
|
*
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
* @author Vincent Ryan
|
* @author Vincent Ryan
|
||||||
|
* @deprecated This package has been deprecated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@jdk.Exported
|
@jdk.Exported
|
||||||
|
@Deprecated
|
||||||
public abstract class ContentSigner {
|
public abstract class ContentSigner {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,8 +34,10 @@ import java.util.zip.ZipFile;
|
||||||
*
|
*
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
* @author Vincent Ryan
|
* @author Vincent Ryan
|
||||||
|
* @deprecated This package has been deprecated.
|
||||||
*/
|
*/
|
||||||
@jdk.Exported
|
@jdk.Exported
|
||||||
|
@Deprecated
|
||||||
public interface ContentSignerParameters {
|
public interface ContentSignerParameters {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,7 +29,10 @@
|
||||||
* Clients may override the default signing mechanism of the <tt>jarsigner</tt>
|
* Clients may override the default signing mechanism of the <tt>jarsigner</tt>
|
||||||
* tool by supplying an alternative implementation of
|
* tool by supplying an alternative implementation of
|
||||||
* {@link com.sun.jarsigner.ContentSigner}.
|
* {@link com.sun.jarsigner.ContentSigner}.
|
||||||
|
*
|
||||||
|
* This package has been deprecated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@jdk.Exported
|
@jdk.Exported
|
||||||
|
@Deprecated
|
||||||
package com.sun.jarsigner;
|
package com.sun.jarsigner;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -75,7 +75,7 @@ import java.util.Base64;
|
||||||
* @author Roland Schemers
|
* @author Roland Schemers
|
||||||
* @author Jan Luehe
|
* @author Jan Luehe
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
// for i18n
|
// for i18n
|
||||||
|
@ -396,9 +396,15 @@ public class Main {
|
||||||
} else if (collator.compare(flags, "-altsigner") ==0) {
|
} else if (collator.compare(flags, "-altsigner") ==0) {
|
||||||
if (++n == args.length) usageNoArg();
|
if (++n == args.length) usageNoArg();
|
||||||
altSignerClass = args[n];
|
altSignerClass = args[n];
|
||||||
|
System.err.println(
|
||||||
|
rb.getString("This.option.is.deprecated") +
|
||||||
|
"-altsigner");
|
||||||
} else if (collator.compare(flags, "-altsignerpath") ==0) {
|
} else if (collator.compare(flags, "-altsignerpath") ==0) {
|
||||||
if (++n == args.length) usageNoArg();
|
if (++n == args.length) usageNoArg();
|
||||||
altSignerClasspath = args[n];
|
altSignerClasspath = args[n];
|
||||||
|
System.err.println(
|
||||||
|
rb.getString("This.option.is.deprecated") +
|
||||||
|
"-altsignerpath");
|
||||||
} else if (collator.compare(flags, "-sectionsonly") ==0) {
|
} else if (collator.compare(flags, "-sectionsonly") ==0) {
|
||||||
signManifest = false;
|
signManifest = false;
|
||||||
} else if (collator.compare(flags, "-internalsf") ==0) {
|
} else if (collator.compare(flags, "-internalsf") ==0) {
|
||||||
|
@ -2306,6 +2312,7 @@ class SignatureFile {
|
||||||
* @param args The command-line arguments to jarsigner.
|
* @param args The command-line arguments to jarsigner.
|
||||||
* @param zipFile The original source Zip file.
|
* @param zipFile The original source Zip file.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public Block generateBlock(PrivateKey privateKey,
|
public Block generateBlock(PrivateKey privateKey,
|
||||||
String sigalg,
|
String sigalg,
|
||||||
X509Certificate[] certChain,
|
X509Certificate[] certChain,
|
||||||
|
@ -2331,6 +2338,7 @@ class SignatureFile {
|
||||||
/*
|
/*
|
||||||
* Construct a new signature block.
|
* Construct a new signature block.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
Block(SignatureFile sfg, PrivateKey privateKey, String sigalg,
|
Block(SignatureFile sfg, PrivateKey privateKey, String sigalg,
|
||||||
X509Certificate[] certChain, boolean externalSF, String tsaUrl,
|
X509Certificate[] certChain, boolean externalSF, String tsaUrl,
|
||||||
X509Certificate tsaCert, String tSAPolicyID, String tSADigestAlg,
|
X509Certificate tsaCert, String tSAPolicyID, String tSADigestAlg,
|
||||||
|
@ -2451,6 +2459,7 @@ class SignatureFile {
|
||||||
/*
|
/*
|
||||||
* This object encapsulates the parameters used to perform content signing.
|
* This object encapsulates the parameters used to perform content signing.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
class JarSignerParameters implements ContentSignerParameters {
|
class JarSignerParameters implements ContentSignerParameters {
|
||||||
|
|
||||||
private String[] args;
|
private String[] args;
|
||||||
|
|
|
@ -44,6 +44,7 @@ public class Resources extends java.util.ListResourceBundle {
|
||||||
{"signerClass.is.not.a.signing.mechanism", "{0} is not a signing mechanism"},
|
{"signerClass.is.not.a.signing.mechanism", "{0} is not a signing mechanism"},
|
||||||
{"jarsigner.error.", "jarsigner error: "},
|
{"jarsigner.error.", "jarsigner error: "},
|
||||||
{"Illegal.option.", "Illegal option: "},
|
{"Illegal.option.", "Illegal option: "},
|
||||||
|
{"This.option.is.deprecated", "This option is deprecated: "},
|
||||||
{".keystore.must.be.NONE.if.storetype.is.{0}",
|
{".keystore.must.be.NONE.if.storetype.is.{0}",
|
||||||
"-keystore must be NONE if -storetype is {0}"},
|
"-keystore must be NONE if -storetype is {0}"},
|
||||||
{".keypass.can.not.be.specified.if.storetype.is.{0}",
|
{".keypass.can.not.be.specified.if.storetype.is.{0}",
|
||||||
|
@ -91,9 +92,11 @@ public class Resources extends java.util.ListResourceBundle {
|
||||||
{".tsadigestalg.algorithm.of.digest.data.in.timestamping.request",
|
{".tsadigestalg.algorithm.of.digest.data.in.timestamping.request",
|
||||||
"[-tsadigestalg <algorithm>] algorithm of digest data in timestamping request"},
|
"[-tsadigestalg <algorithm>] algorithm of digest data in timestamping request"},
|
||||||
{".altsigner.class.class.name.of.an.alternative.signing.mechanism",
|
{".altsigner.class.class.name.of.an.alternative.signing.mechanism",
|
||||||
"[-altsigner <class>] class name of an alternative signing mechanism"},
|
"[-altsigner <class>] class name of an alternative signing mechanism\n" +
|
||||||
|
" (This option has been deprecated.)"},
|
||||||
{".altsignerpath.pathlist.location.of.an.alternative.signing.mechanism",
|
{".altsignerpath.pathlist.location.of.an.alternative.signing.mechanism",
|
||||||
"[-altsignerpath <pathlist>] location of an alternative signing mechanism"},
|
"[-altsignerpath <pathlist>] location of an alternative signing mechanism\n" +
|
||||||
|
" (This option has been deprecated.)"},
|
||||||
{".internalsf.include.the.SF.file.inside.the.signature.block",
|
{".internalsf.include.the.SF.file.inside.the.signature.block",
|
||||||
"[-internalsf] include the .SF file inside the signature block"},
|
"[-internalsf] include the .SF file inside the signature block"},
|
||||||
{".sectionsonly.don.t.compute.hash.of.entire.manifest",
|
{".sectionsonly.don.t.compute.hash.of.entire.manifest",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -45,7 +45,7 @@ import sun.security.x509.*;
|
||||||
*
|
*
|
||||||
* @author Vincent Ryan
|
* @author Vincent Ryan
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public final class TimestampedSigner extends ContentSigner {
|
public final class TimestampedSigner extends ContentSigner {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue