
br.com.esec.icpm.libs.signature.SignatureOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of certillion-client-library Show documentation
Show all versions of certillion-client-library Show documentation
This library is used to make integration with Certillion server, so our Clients can easily ask for signatures or generate certificates.
package br.com.esec.icpm.libs.signature;
import br.com.esec.icpm.server.ws.AlgorithmCertificateFilterType;
import br.com.esec.icpm.server.ws.AlgorithmType;
import br.com.esec.icpm.server.ws.CertificateFilterType;
import br.com.esec.icpm.server.ws.CertificateFiltersType;
import br.com.esec.icpm.server.ws.ForceHardwareFilterType;
public class SignatureOptions {
CertificateFiltersType certificateFilters;
public SignatureOptions onlyRsa() {
addFilter(new AlgorithmCertificateFilterType(AlgorithmType.RSA));
return this;
}
public SignatureOptions onlyEcdsa() {
addFilter(new AlgorithmCertificateFilterType(AlgorithmType.ECC));
return this;
}
public void forceHardware() {
addFilter(new ForceHardwareFilterType(true));
}
private void addFilter(CertificateFilterType filter) {
if (certificateFilters == null)
certificateFilters = new CertificateFiltersType();
certificateFilters.addFilter(filter);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy