public CMSSignedData getSignature()

in jsign-core/src/main/java/net/jsign/pe/CertificateTableEntry.java [59:77]


    public CMSSignedData getSignature() throws CMSException {
        if (type != CertificateType.PKCS_SIGNED_DATA.getValue()) {
            throw new UnsupportedOperationException("Unsupported certificate type: " + type);
        }
        
        if (revision != 0x0200) {
            throw new UnsupportedOperationException("Unsupported certificate revision: " + revision);
        }
        
        if (signature == null) {
            try {
                signature = new CMSSignedData((CMSProcessable) null, ContentInfo.getInstance(new ASN1InputStream(content).readObject()));
            } catch (IOException e) {
                throw new IllegalArgumentException("Failed to construct ContentInfo from byte[]: ", e);
            }
        }
        
        return signature;
    }