com.sun.jarsigner.ContentSignerParameters Java Examples

The following examples show how to use com.sun.jarsigner.ContentSignerParameters. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JarSigner.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@SuppressWarnings("deprecation")
public byte[] generateBlock(ContentSignerParameters params,
                            boolean externalSF,
                            ContentSigner signingMechanism)
        throws NoSuchAlgorithmException,
               IOException, CertificateException {

    if (signingMechanism == null) {
        signingMechanism = new TimestampedSigner();
    }
    return signingMechanism.generateSignedData(
            params,
            externalSF,
            params.getTimestampingAuthority() != null
                || params.getTimestampingAuthorityCertificate() != null);
}
 
Example #2
Source File: Spec.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public byte[] generateSignedData(
        ContentSignerParameters parameters,
        boolean omitContent,
        boolean applyTimestamp) throws NoSuchAlgorithmException,
        CertificateException, IOException {
    return new byte[0];
}
 
Example #3
Source File: Options.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public byte[] generateSignedData(ContentSignerParameters parameters,
        boolean omitContent, boolean applyTimestamp)
        throws NoSuchAlgorithmException, CertificateException,
                IOException {
    return "1234".getBytes();
}