Giter Club home page Giter Club logo

ejbca-cert-cvc's Introduction

EJBCA Cert CVC

EJBCA Cert CVC is a Java library for parsing, creating, and using cv certificates defined for Extended Access Control (EAC) in BSI TR-03110. It is primarily used for ePassports and eIDs.

Get Started

Dependencies

Cert-cvc depends on the Bouncycastle JCE provider (www.bouncycastle.org). The provider is used for DER encoding and some crypto stuff.

Building and testing with Maven

You build, and run JUnit tests with maven.

mvn package

will build, run tests and place the artefact in 'target'.

Using

There are example and test code which demonstrates the use of cert-cvc.jar, see here:

Community Support

In the Keyfactor Community, we welcome contributions.

The Community software is open-source and community-supported, meaning that no SLA is applicable.

Commercial Support

Commercial support is available for EJBCA Enterprise.

License

For license information, see LICENSE.

Related Projects

See all Keyfactor EJBCA GitHub projects.

ejbca-cert-cvc's People

Contributors

karolinhem avatar maxfichtelmann avatar mike-agrenius-kushner avatar primetomas avatar realiserad avatar samuellbkf avatar vombatinlagoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ejbca-cert-cvc's Issues

BC API issue in OIDField

@primetomas @dghgit

BouncyCastle bc-java had this issue raised recently: bcgit/bc-java#1015, which led to noticing that some code in https://github.com/primekeydevs/cert-cvc/blob/trunk/src/main/java/org/ejbca/cvc/OIDField.java no longer works with our latest beta versions for 1.70.

The issue is this line (https://github.com/primekeydevs/cert-cvc/blob/d6ab56912354ea2f793ceb3a8d4a104b1743a20a/src/main/java/org/ejbca/cvc/OIDField.java#L68):

this.id = ASN1ObjectIdentifier.getInstance(new DERTaggedObject(true, 0, new DEROctetString(data)), false).getId();

The first problem is that the "true" creates an explicit tag, which is then passed to getInstance saying that an implicit tag is expected (the "false"). Beyond that however it is relying on behaviour that is really intended for the parser to use (interpreting the octet string as an implicitly-encoded ASN1ObjectIdentifier).

  1. I have patched bc-java so that this existing behaviour will continue to work for you in 1.70 and probably for a while after that.

  2. I have added a utility method for 1.70 to directly achieve what this code is trying to do, like so:

this.id = ASN1ObjectIdentifier.fromContents(data).getId();

  1. The following code avoids assumptions about internals. It should also be portable backwards (several years) and forwards (but switch to the simpler form above when possible):
ASN1TaggedObject pseudo = new DERTaggedObject(false, 0, new DEROctetString(data));
ASN1TaggedObject parsed = ASN1TaggedObject.getInstance(pseudo.getEncoded(ASN1Encoding.DER));
this.id = ASN1ObjectIdentifier.getInstance(parsed, false).getId();

There is no emergency because of (1), but I recommend you switch to (3) and make a note to change to (2) if/when 1.70+ becomes a required minimum version for the BC dependency.

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.