Class SignedApplicationBinaryInputStream

java.lang.Object
java.io.InputStream
com.microej.util.appverifier.SignedApplicationBinaryInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class SignedApplicationBinaryInputStream extends InputStream
The installable Application binary exposed by SignedApplicationVerifier.verify(InputStream).

Reading this stream returns the Application binary payload only (the install-request wrapper has already been stripped). The digital signature is verified lazily: it is checked once this stream has been entirely consumed. Until then the integrity of the content is not guaranteed, so callers must not trust partial reads.

Warning: the signature is only verified after the stream has been fully consumed. Installing this stream directly (for example with a Kernel install API) may result in writing an Application, possibly to persistent memory, before it has been verified. Once the stream has been fully read, call isVerified() to confirm the signature before trusting the installed Application.

Since:
1.0.0