8076535: Deprecate the com.sun.jarsigner package

Reviewed-by: mullan
This commit is contained in:
Jason Uh 2015-06-05 11:27:22 -07:00
parent 57abe9b399
commit d7cf775ca7
6 changed files with 28 additions and 9 deletions

View File

@ -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.
*
* 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
* @author Vincent Ryan
* @deprecated This package has been deprecated.
*/
@jdk.Exported
@Deprecated
public abstract class ContentSigner {
/**

View File

@ -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.
*
* 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
* @author Vincent Ryan
* @deprecated This package has been deprecated.
*/
@jdk.Exported
@Deprecated
public interface ContentSignerParameters {
/**

View File

@ -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.
*
* 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>
* tool by supplying an alternative implementation of
* {@link com.sun.jarsigner.ContentSigner}.
*
* This package has been deprecated.
*/
@jdk.Exported
@Deprecated
package com.sun.jarsigner;

View File

@ -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.
*
* 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 Jan Luehe
*/
@SuppressWarnings("deprecation")
public class Main {
// for i18n
@ -396,9 +396,15 @@ public class Main {
} else if (collator.compare(flags, "-altsigner") ==0) {
if (++n == args.length) usageNoArg();
altSignerClass = args[n];
System.err.println(
rb.getString("This.option.is.deprecated") +
"-altsigner");
} else if (collator.compare(flags, "-altsignerpath") ==0) {
if (++n == args.length) usageNoArg();
altSignerClasspath = args[n];
System.err.println(
rb.getString("This.option.is.deprecated") +
"-altsignerpath");
} else if (collator.compare(flags, "-sectionsonly") ==0) {
signManifest = false;
} else if (collator.compare(flags, "-internalsf") ==0) {
@ -2306,6 +2312,7 @@ class SignatureFile {
* @param args The command-line arguments to jarsigner.
* @param zipFile The original source Zip file.
*/
@SuppressWarnings("deprecation")
public Block generateBlock(PrivateKey privateKey,
String sigalg,
X509Certificate[] certChain,
@ -2331,6 +2338,7 @@ class SignatureFile {
/*
* Construct a new signature block.
*/
@SuppressWarnings("deprecation")
Block(SignatureFile sfg, PrivateKey privateKey, String sigalg,
X509Certificate[] certChain, boolean externalSF, String tsaUrl,
X509Certificate tsaCert, String tSAPolicyID, String tSADigestAlg,
@ -2451,6 +2459,7 @@ class SignatureFile {
/*
* This object encapsulates the parameters used to perform content signing.
*/
@SuppressWarnings("deprecation")
class JarSignerParameters implements ContentSignerParameters {
private String[] args;

View File

@ -44,6 +44,7 @@ public class Resources extends java.util.ListResourceBundle {
{"signerClass.is.not.a.signing.mechanism", "{0} is not a signing mechanism"},
{"jarsigner.error.", "jarsigner error: "},
{"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}"},
{".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>] 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\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\n" +
" (This option has been deprecated.)"},
{".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",

View File

@ -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.
*
* This code is free software; you can redistribute it and/or modify it
@ -45,7 +45,7 @@ import sun.security.x509.*;
*
* @author Vincent Ryan
*/
@SuppressWarnings("deprecation")
public final class TimestampedSigner extends ContentSigner {
/*