Class AbstractSignatureIdentityInformation
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.AbstractSignatureIdentityInformation
- All Implemented Interfaces:
AttributeCertificateCollection
,CertificateCollection
,CRLRevocationInformation
,OCSPRevocationInformation
- Direct Known Subclasses:
SignatureIdentityInformation
,SignatureIdentityInformation
,SignatureIdentityInformation
public abstract class AbstractSignatureIdentityInformation extends Object implements CRLRevocationInformation, CertificateCollection, AttributeCertificateCollection, OCSPRevocationInformation
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractSignatureIdentityInformation.AttributeCertificateSelector
static class
AbstractSignatureIdentityInformation.CertificateSelector
static class
AbstractSignatureIdentityInformation.CRLSelector
static class
AbstractSignatureIdentityInformation.OCSPSelector
protected static class
AbstractSignatureIdentityInformation.SourcedInformation<T>
Nested classes/interfaces inherited from interface br.ufsc.labsec.signature.validationData.OCSPRevocationInformation
OCSPRevocationInformation.OCSPResult
-
Field Summary
Fields Modifier and Type Field Description protected Map<SignatureObject,AbstractSignatureIdentityInformation.SourcedInformation<org.bouncycastle.cert.X509AttributeCertificateHolder>>
attributeCertificates
protected Map<SignatureObject,AbstractSignatureIdentityInformation.SourcedInformation<org.bouncycastle.asn1.ocsp.BasicOCSPResponse>>
basicOCSPResponses
protected Map<SignatureObject,AbstractSignatureIdentityInformation.SourcedInformation<Certificate>>
certificates
protected Map<SignatureObject,AbstractSignatureIdentityInformation.SourcedInformation<CRL>>
crls
-
Constructor Summary
Constructors Constructor Description AbstractSignatureIdentityInformation()
-
Method Summary
Modifier and Type Method Description void
addAttributeCertificate(SignatureObject signature, org.bouncycastle.cert.X509AttributeCertificateHolder holder, Source source)
void
addAttributeCertificates(SignatureObject signature, Collection<org.bouncycastle.cert.X509AttributeCertificateHolder> certificates, Source source)
void
addCertificate(SignatureObject signature, Certificate certificates, Source source)
void
addCertificates(SignatureObject signature, Collection<Certificate> certificates, Source source)
Adiciona os certificados à lista de certificados da assinaturavoid
addCRL(SignatureObject signature, CRL crl, Source source)
Adiciona uma CRL à lista de certificados revogadosvoid
addCRLs(SignatureObject signature, Collection<CRL> crls, Source source)
void
addOCSP(SignatureObject signature, org.bouncycastle.asn1.ocsp.BasicOCSPResponse ocsp, Source source)
void
addOCSPs(SignatureObject signature, Collection<org.bouncycastle.asn1.ocsp.BasicOCSPResponse> ocsps, Source source)
void
clearAll()
void
clearAttributeCertificates()
void
clearCertificates()
void
clearCRLs()
void
clearOCSPs()
Optional<org.bouncycastle.cert.X509AttributeCertificateHolder>
getAttributeCertificate(SignatureObject signature)
Optional<org.bouncycastle.cert.X509AttributeCertificateHolder>
getAttributeCertificate(SignatureObject signature, org.bouncycastle.util.Selector<org.bouncycastle.cert.X509AttributeCertificateHolder> selector, Source source)
List<org.bouncycastle.cert.X509AttributeCertificateHolder>
getAttributeCertificates(SignatureObject signature)
List<org.bouncycastle.cert.X509AttributeCertificateHolder>
getAttributeCertificates(SignatureObject signature, org.bouncycastle.util.Selector<org.bouncycastle.cert.X509AttributeCertificateHolder> selector, Source source)
Optional<Certificate>
getCertificate(SignatureObject signature)
Busca por um certificado entre a lista de certificados da assinaturaOptional<Certificate>
getCertificate(SignatureObject signature, org.bouncycastle.util.Selector<Certificate> selector, Source source)
Busca por um certificado entre a lista de certificados da assinaturaOptional<Certificate>
getCertificate(org.bouncycastle.util.Selector<Certificate> selector)
List<Certificate>
getCertificates(SignatureObject signature)
Retorna a lista de certificados utilizados na assinaturaList<Certificate>
getCertificates(SignatureObject signature, org.bouncycastle.util.Selector<Certificate> selector, Source source)
Retorna a lista de certificados utilizados na assinaturaList<Certificate>
getCertificates(org.bouncycastle.util.Selector<Certificate> selector)
Optional<CRL>
getCRL(SignatureObject signature)
Optional<CRL>
getCRL(SignatureObject signature, org.bouncycastle.util.Selector<CRL> selector, Source source)
List<CRL>
getCRLs(SignatureObject signature)
List<CRL>
getCRLs(SignatureObject signature, org.bouncycastle.util.Selector<CRL> selector, Source source)
Busca por LCRs entre a lista de LCRs da assinaturaOptional<org.bouncycastle.asn1.ocsp.BasicOCSPResponse>
getOCSP(SignatureObject signature)
Optional<org.bouncycastle.asn1.ocsp.BasicOCSPResponse>
getOCSP(SignatureObject signature, org.bouncycastle.util.Selector<org.bouncycastle.asn1.ocsp.BasicOCSPResponse> selector, Source source)
List<org.bouncycastle.asn1.ocsp.BasicOCSPResponse>
getOCSPs(SignatureObject signature)
List<org.bouncycastle.asn1.ocsp.BasicOCSPResponse>
getOCSPs(SignatureObject signature, org.bouncycastle.util.Selector<org.bouncycastle.asn1.ocsp.BasicOCSPResponse> selector, Source source)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface br.ufsc.labsec.signature.validationData.AttributeCertificateCollection
addAttributeCertificate, addAttributeCertificates, getAttributeCertificate, getAttributeCertificates
Methods inherited from interface br.ufsc.labsec.signature.validationData.CertificateCollection
addCertificate, addCertificates, getCertificate, getCertificates
Methods inherited from interface br.ufsc.labsec.signature.validationData.CRLRevocationInformation
addCRL, addCRLs, getCRL, getCRLs
Methods inherited from interface br.ufsc.labsec.signature.validationData.OCSPRevocationInformation
addOCSP, addOCSPs, getOCSP, getOCSPs
-
Field Details
-
certificates
protected Map<SignatureObject,AbstractSignatureIdentityInformation.SourcedInformation<Certificate>> certificates -
crls
-
basicOCSPResponses
protected Map<SignatureObject,AbstractSignatureIdentityInformation.SourcedInformation<org.bouncycastle.asn1.ocsp.BasicOCSPResponse>> basicOCSPResponses -
attributeCertificates
protected Map<SignatureObject,AbstractSignatureIdentityInformation.SourcedInformation<org.bouncycastle.cert.X509AttributeCertificateHolder>> attributeCertificates
-
-
Constructor Details
-
AbstractSignatureIdentityInformation
public AbstractSignatureIdentityInformation()
-
-
Method Details
-
getCertificate
- Specified by:
getCertificate
in interfaceCertificateCollection
-
getCertificates
- Specified by:
getCertificates
in interfaceCertificateCollection
-
addCertificate
- Specified by:
addCertificate
in interfaceCertificateCollection
-
addCertificates
public void addCertificates(SignatureObject signature, Collection<Certificate> certificates, Source source)Adiciona os certificados à lista de certificados da assinatura- Specified by:
addCertificates
in interfaceCertificateCollection
- Parameters:
certificates
- Lista de certificados a serem adicionados
-
getCertificate
Busca por um certificado entre a lista de certificados da assinatura- Specified by:
getCertificate
in interfaceCertificateCollection
- Parameters:
signature
- Selector para identificar o certificado desejado- Returns:
- O certificado desejado, ou nulo caso não seja encontrado
-
getCertificate
public Optional<Certificate> getCertificate(SignatureObject signature, org.bouncycastle.util.Selector<Certificate> selector, Source source)Busca por um certificado entre a lista de certificados da assinatura- Specified by:
getCertificate
in interfaceCertificateCollection
- Parameters:
selector
- Selector para identificar o certificado desejado- Returns:
- O certificado desejado, ou nulo caso não seja encontrado
-
getCertificates
Retorna a lista de certificados utilizados na assinatura- Specified by:
getCertificates
in interfaceCertificateCollection
- Returns:
- Lista de certificados da assinatura
-
getCertificates
public List<Certificate> getCertificates(SignatureObject signature, org.bouncycastle.util.Selector<Certificate> selector, Source source)Retorna a lista de certificados utilizados na assinatura- Specified by:
getCertificates
in interfaceCertificateCollection
- Returns:
- Lista de certificados da assinatura
-
addCRL
Adiciona uma CRL à lista de certificados revogados- Specified by:
addCRL
in interfaceCRLRevocationInformation
- Parameters:
signature
- Lista de certificados aos quais pertencem as CRLscrl
- A lista de CRLs a ser adicionadasource
- De onde a CRL deve ser obtida na assinatura.
-
addCRLs
- Specified by:
addCRLs
in interfaceCRLRevocationInformation
-
getCRL
- Specified by:
getCRL
in interfaceCRLRevocationInformation
-
getCRL
public Optional<CRL> getCRL(SignatureObject signature, org.bouncycastle.util.Selector<CRL> selector, Source source)- Specified by:
getCRL
in interfaceCRLRevocationInformation
-
getCRLs
- Specified by:
getCRLs
in interfaceCRLRevocationInformation
-
getCRLs
public List<CRL> getCRLs(SignatureObject signature, org.bouncycastle.util.Selector<CRL> selector, Source source)Busca por LCRs entre a lista de LCRs da assinatura- Specified by:
getCRLs
in interfaceCRLRevocationInformation
- Parameters:
selector
- identifica a CRL desejada de acordo com o seu emissor e referência temporal- Returns:
- As LCRs desejadas, ou um conjunto vazio
-
addOCSP
public void addOCSP(SignatureObject signature, org.bouncycastle.asn1.ocsp.BasicOCSPResponse ocsp, Source source)- Specified by:
addOCSP
in interfaceOCSPRevocationInformation
-
addOCSPs
public void addOCSPs(SignatureObject signature, Collection<org.bouncycastle.asn1.ocsp.BasicOCSPResponse> ocsps, Source source)- Specified by:
addOCSPs
in interfaceOCSPRevocationInformation
-
getOCSP
-
getOCSP
public Optional<org.bouncycastle.asn1.ocsp.BasicOCSPResponse> getOCSP(SignatureObject signature, org.bouncycastle.util.Selector<org.bouncycastle.asn1.ocsp.BasicOCSPResponse> selector, Source source)- Specified by:
getOCSP
in interfaceOCSPRevocationInformation
-
getOCSPs
- Specified by:
getOCSPs
in interfaceOCSPRevocationInformation
-
getOCSPs
public List<org.bouncycastle.asn1.ocsp.BasicOCSPResponse> getOCSPs(SignatureObject signature, org.bouncycastle.util.Selector<org.bouncycastle.asn1.ocsp.BasicOCSPResponse> selector, Source source)- Specified by:
getOCSPs
in interfaceOCSPRevocationInformation
-
getAttributeCertificate
public Optional<org.bouncycastle.cert.X509AttributeCertificateHolder> getAttributeCertificate(SignatureObject signature)- Specified by:
getAttributeCertificate
in interfaceAttributeCertificateCollection
-
getAttributeCertificate
public Optional<org.bouncycastle.cert.X509AttributeCertificateHolder> getAttributeCertificate(SignatureObject signature, org.bouncycastle.util.Selector<org.bouncycastle.cert.X509AttributeCertificateHolder> selector, Source source)- Specified by:
getAttributeCertificate
in interfaceAttributeCertificateCollection
-
getAttributeCertificates
public List<org.bouncycastle.cert.X509AttributeCertificateHolder> getAttributeCertificates(SignatureObject signature)- Specified by:
getAttributeCertificates
in interfaceAttributeCertificateCollection
-
getAttributeCertificates
public List<org.bouncycastle.cert.X509AttributeCertificateHolder> getAttributeCertificates(SignatureObject signature, org.bouncycastle.util.Selector<org.bouncycastle.cert.X509AttributeCertificateHolder> selector, Source source)- Specified by:
getAttributeCertificates
in interfaceAttributeCertificateCollection
-
addAttributeCertificate
public void addAttributeCertificate(SignatureObject signature, org.bouncycastle.cert.X509AttributeCertificateHolder holder, Source source)- Specified by:
addAttributeCertificate
in interfaceAttributeCertificateCollection
-
addAttributeCertificates
public void addAttributeCertificates(SignatureObject signature, Collection<org.bouncycastle.cert.X509AttributeCertificateHolder> certificates, Source source)- Specified by:
addAttributeCertificates
in interfaceAttributeCertificateCollection
-
clearAll
public void clearAll()- Specified by:
clearAll
in interfaceCRLRevocationInformation
- Specified by:
clearAll
in interfaceOCSPRevocationInformation
-
clearCertificates
public void clearCertificates()- Specified by:
clearCertificates
in interfaceCertificateCollection
-
clearCRLs
public void clearCRLs()- Specified by:
clearCRLs
in interfaceCRLRevocationInformation
-
clearOCSPs
public void clearOCSPs()- Specified by:
clearOCSPs
in interfaceOCSPRevocationInformation
-
clearAttributeCertificates
public void clearAttributeCertificates()- Specified by:
clearAttributeCertificates
in interfaceAttributeCertificateCollection
-