Package org.appng.core.security.signing
Class Signer
- java.lang.Object
-
- org.appng.core.security.signing.Signer
-
public class Signer extends Object
Central class for signing and validating repositories.- Author:
- Dirk Heuvels, Matthias Müller
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Signer
getRepoValidator(ValidatorConfig config, byte[] indexFileData, byte[] signatureData)
static Signer
getRepoValidator(ValidatorConfig config, byte[] indexFileData, byte[] signatureData, Collection<X509Certificate> trustedCerts)
static SignatureWrapper
signRepo(Path repoPath, SignerConfig config)
boolean
validatePackage(byte[] bytes, String packageName)
protected static void
verifyIndex(ValidatorConfig config, byte[] indexFileData)
-
-
-
Method Detail
-
getRepoValidator
public static Signer getRepoValidator(ValidatorConfig config, byte[] indexFileData, byte[] signatureData) throws SigningException
- Throws:
SigningException
-
getRepoValidator
public static Signer getRepoValidator(ValidatorConfig config, byte[] indexFileData, byte[] signatureData, Collection<X509Certificate> trustedCerts) throws SigningException
- Throws:
SigningException
-
verifyIndex
protected static void verifyIndex(ValidatorConfig config, byte[] indexFileData) throws SigningException
- Throws:
SigningException
-
validatePackage
public boolean validatePackage(byte[] bytes, String packageName) throws SigningException
- Throws:
SigningException
-
signRepo
public static SignatureWrapper signRepo(Path repoPath, SignerConfig config) throws SigningException
- Throws:
SigningException
-
-