Skip to content

Java library for issuing UziServerCertificateCredentials with a did:x509 issuer

License

Notifications You must be signed in to change notification settings

nuts-foundation/uzi-did-x509-issuer-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java library for generating X509 Verifiable credentials

Usage

try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream("full-chain-and-leaf.pem")) {
    List<X509Certificate> certificates = X509CertificateParser.parse(inputStream);
    Certificate certificate = new Certificate(certificates);
    String jwt = JWTGenerator.generateVC(certificate, privateKey, "did:web:example.com:iam:the_subject");
}

Caveats

Use the BouncyCastle provider when parsing PKCS12 files and extracting certificates for it:

static {
    Security.addProvider(new BouncyCastleProvider());
}

KeyStore keystore = KeyStore.getInstance("PKCS12", "BC");

About

Java library for issuing UziServerCertificateCredentials with a did:x509 issuer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages