diff --git a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java
index 0446ab405b0..2911f0bb452 100644
--- a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java
+++ b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java
@@ -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 {
/**
diff --git a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java
index 94704dc6175..2caef7eda74 100644
--- a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java
+++ b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java
@@ -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 {
/**
diff --git a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java
index 554d4c7b076..6d0dfb14388 100644
--- a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java
+++ b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java
@@ -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 jarsigner
* tool by supplying an alternative implementation of
* {@link com.sun.jarsigner.ContentSigner}.
+ *
+ * This package has been deprecated.
*/
@jdk.Exported
+@Deprecated
package com.sun.jarsigner;
diff --git a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
index 12483c8b357..f2f3776265a 100644
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
@@ -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;
diff --git a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java
index e858523717f..883ef0406e3 100644
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java
@@ -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 of digest data in timestamping request"},
{".altsigner.class.class.name.of.an.alternative.signing.mechanism",
- "[-altsigner ] class name of an alternative signing mechanism"},
+ "[-altsigner ] class name of an alternative signing mechanism\n" +
+ " (This option has been deprecated.)"},
{".altsignerpath.pathlist.location.of.an.alternative.signing.mechanism",
- "[-altsignerpath ] location of an alternative signing mechanism"},
+ "[-altsignerpath ] 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",
diff --git a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java
index 905cc9310cc..938897b8789 100644
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java
@@ -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 {
/*