Class SignedData
java.lang.Object
com.codename1.backend.security.pki.SignedData
The content and the certificates of a CMS SignedData structure (RFC 5652),
the PKCS#7 envelope a .mobileprovision profile, a signed manifest or a
detached signature file arrives in.
SignedData signed = SignedData.decode(profileBytes);
byte[] plist = signed.getContent();
List<Certificate> chain = signed.getCertificates();
It reads; it does not judge. Nothing here checks the signer's signature
over the content or the chain behind it: validate the certificates with
CertificateValidator and trust the content only as far as that goes.
Like the rest of this package it reads DER, so a BER encoding with
indefinite lengths is reported as such.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SignedDatadecode(byte[] der) Reads a ContentInfo that holds SignedData.The certificates the sender included, in the order sent; usually the signer's and the intermediates behind it.byte[]The signed content, or null when the signature is detached.The type of the content,DATAfor plain bytes.intHow many signers signed it.
-
Field Details
-
SIGNED_DATA
-
DATA
-
-
Method Details
-
decode
Reads a ContentInfo that holds SignedData.- Throws:
IOException
-
getContentType
-
getContent
public byte[] getContent()The signed content, or null when the signature is detached. -
getCertificates
The certificates the sender included, in the order sent; usually the signer's and the intermediates behind it. -
getSignerCount
public int getSignerCount()How many signers signed it.
-