Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/jarsigner/ContentSignerParameters.java
38831 views
/*1* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package com.sun.jarsigner;2627import java.net.URI;28import java.security.cert.X509Certificate;29import java.util.zip.ZipFile;3031/**32* This interface encapsulates the parameters for a ContentSigner object.33*34* @since 1.535* @author Vincent Ryan36*/37@jdk.Exported38public interface ContentSignerParameters {3940/**41* Retrieves the command-line arguments passed to the jarsigner tool.42*43* @return The command-line arguments. May be null.44*/45public String[] getCommandLine();4647/**48* Retrieves the identifier for a Timestamping Authority (TSA).49*50* @return The TSA identifier. May be null.51*/52public URI getTimestampingAuthority();5354/**55* Retrieves the certificate for a Timestamping Authority (TSA).56*57* @return The TSA certificate. May be null.58*/59public X509Certificate getTimestampingAuthorityCertificate();6061/**62* Retrieves the TSAPolicyID for a Timestamping Authority (TSA).63*64* @return The TSAPolicyID. May be null.65*/66public default String getTSAPolicyID() {67return null;68}6970/**71* Retrieves the JAR file's signature.72*73* @return The non-null array of signature bytes.74*/75public byte[] getSignature();7677/**78* Retrieves the name of the signature algorithm.79*80* @return The non-null string name of the signature algorithm.81*/82public String getSignatureAlgorithm();8384/**85* Retrieves the signer's X.509 certificate chain.86*87* @return The non-null array of X.509 public-key certificates.88*/89public X509Certificate[] getSignerCertificateChain();9091/**92* Retrieves the content that was signed.93* The content is the JAR file's signature file.94*95* @return The content bytes. May be null.96*/97public byte[] getContent();9899/**100* Retrieves the original source ZIP file before it was signed.101*102* @return The original ZIP file. May be null.103*/104public ZipFile getSource();105}106107108