Giter Club home page Giter Club logo

efm-certvalidator's Introduction

Teknisk dokumentasjon av Digitaliseringsdirektoratet fellesløsninger

Dette er kildekoden til den tekniske dokumentasjonen for Digitaliseringsdirektoratet fellesløsninger.

Du finner en formatert versjon av denne dokumentasjonen på følgende nettside: https://docs.digdir.no

efm-certvalidator's People

Contributors

glennbech avatar klakegg avatar steinarhenriksen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

efm-certvalidator's Issues

Questions about the validatorFactory

Hi great library you have built. Had just couple of questions if you could answer.

(1) Is the validator costly to instantiate?

(2) How would one approach if wanting to dynamically update the root & intermediate buckets used by the validator?

Also I noticed that the README should update with the latest version 2.2.0

BR

Using bouncycastle version 1.66 throws ClassCastException

We tried to upgrade our bouncycastle dependencies to version 1.66, but we get a ClassCastException with the following stacktrace:

no.difi.vefa.peppol.security.lang.PeppolSecurityException: Exception when reading AIA: 'org.bouncycastle.asn1.DLTaggedObject cannot be cast to org.bouncycastle.asn1.DERTaggedObject'.
	at no.difi.vefa.peppol.security.util.DifiCertificateValidator.validate(DifiCertificateValidator.java:64)
	at no.difi.vefa.peppol.lookup.LookupClient.getServiceMetadata(LookupClient.java:95)
       ...internal stack trace here....
Caused by: no.difi.certvalidator.api.FailedValidationException: Exception when reading AIA: 'org.bouncycastle.asn1.DLTaggedObject cannot be cast to org.bouncycastle.asn1.DERTaggedObject'.
	at no.difi.certvalidator.rule.OCSPRule.validate(OCSPRule.java:41)
	at no.difi.certvalidator.rule.AbstractRule.validate(AbstractRule.java:24)
	at no.difi.certvalidator.rule.HandleErrorRule.validate(HandleErrorRule.java:44)
	at no.difi.certvalidator.rule.AbstractRule.validate(AbstractRule.java:17)
	at no.difi.certvalidator.structure.AndJunction.validate(AndJunction.java:29)
	at no.difi.certvalidator.structure.AbstractJunction.validate(AbstractJunction.java:36)
	at no.difi.certvalidator.util.CachedValidatorRule.load(CachedValidatorRule.java:43)
	at no.difi.certvalidator.util.CachedValidatorRule.load(CachedValidatorRule.java:13)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964)
	at no.difi.certvalidator.util.CachedValidatorRule.validate(CachedValidatorRule.java:30)
	at no.difi.certvalidator.util.CachedValidatorRule.validate(CachedValidatorRule.java:35)
	at no.difi.certvalidator.structure.AndJunction.validate(AndJunction.java:29)
	at no.difi.certvalidator.structure.AndJunction.validate(AndJunction.java:29)
	at no.difi.certvalidator.structure.AbstractJunction.validate(AbstractJunction.java:36)
	at no.difi.certvalidator.util.CachedValidatorRule.load(CachedValidatorRule.java:43)
	at no.difi.certvalidator.util.CachedValidatorRule.load(CachedValidatorRule.java:13)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964)
	at no.difi.certvalidator.util.CachedValidatorRule.validate(CachedValidatorRule.java:30)
	at no.difi.certvalidator.util.CachedValidatorRule.validate(CachedValidatorRule.java:35)
	at no.difi.certvalidator.ValidatorGroup.validate(ValidatorGroup.java:79)
	at no.difi.certvalidator.ValidatorGroup.validate(ValidatorGroup.java:70)
	at no.difi.vefa.peppol.security.util.DifiCertificateValidator.validate(DifiCertificateValidator.java:62)
	... 48 more
Caused by: net.klakegg.pkix.ocsp.OcspException: Exception when reading AIA: 'org.bouncycastle.asn1.DLTaggedObject cannot be cast to org.bouncycastle.asn1.DERTaggedObject'.
	at net.klakegg.pkix.ocsp.AbstractOcspClient.detectOcspUri(AbstractOcspClient.java:99)
	at net.klakegg.pkix.ocsp.OcspClient.verify(OcspClient.java:51)
	at net.klakegg.pkix.ocsp.OcspClient.verify(OcspClient.java:44)
	at no.difi.certvalidator.rule.OCSPRule.validate(OCSPRule.java:34)
	... 83 more
Caused by: java.lang.ClassCastException: org.bouncycastle.asn1.DLTaggedObject cannot be cast to org.bouncycastle.asn1.DERTaggedObject
	at net.klakegg.pkix.ocsp.AbstractOcspClient.detectOcspUri(AbstractOcspClient.java:91)
	... 86 more

It seems similar to this issue for digipost's certificate validator digipost/certificate-validator#15

constructor for OCSPRule

Hi
A lot thanks for the library, I have a question.
The example of the OCSP rule don't work, asks for a parameter, for a certificate bucket.

NPE in CRLRule

A NullPointerException might occur in CRLRule, as the stacktrace below shows. As far as I can see this happens when the rule encounters an X.509 CRL which does not have the Next update field. I'm unfortunately not able to provide information about which issuer that returned this CRL. However, I think the rule could handle this scenario better, either by issuing a new fetch, use the current CRL for validation, or fail the validation.

java.lang.NullPointerException: null
        at no.difi.certvalidator.rule.CRLRule.validate(CRLRule.java:50) ~[commons-certvalidator-2.0.1.jar:na]
        at no.difi.certvalidator.structure.AndJunction.validate(AndJunction.java:23) ~[commons-certvalidator-2.0.1.jar:na]
        at no.difi.certvalidator.Validator.validate(Validator.java:49) ~[commons-certvalidator-2.0.1.jar:na]
        at no.difi.common.support.CertificateValidatorInterceptor.validateMessage(CertificateValidatorInterceptor.java:47) ~[CertificateValidatorInterceptor.class:na]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.