GithubHelp home page GithubHelp logo

lethek / fluentcertificates Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 321 KB

FluentCertificates is a library using the Immutable Fluent Builder pattern for easily creating, finding and exporting certificates. Makes it simple to generate your own certificate chains, or just stand-alone self-signed certificates.

License: MIT License

C# 97.45% Batchfile 0.09% PowerShell 1.35% Shell 1.10%
ca cert certificate crt fluent fluent-api pem pfx x509

fluentcertificates's Introduction

Languages

fluentcertificates's People

Contributors

dependabot[bot] avatar lethek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fluentcertificates's Issues

[BUG]Calling .ToCertificateRequest().CreateSigningRequest() on a CertificateBuilder used to work but now throws an exception

Describe the bug
Calling the ToCertificateRequest() method on a CertificateBuilder used to create a CertificateRequest instance that could be called with the parameterless CreateSigningRequest() method overload. However, this now throws an exception:

System.InvalidOperationException: This method cannot be used since no signing key was provided via a constructor, use an overload accepting an X509SignatureGenerator instead.
   at System.Security.Cryptography.X509Certificates.CertificateRequest.CreateSigningRequest()

Expected behaviour
To be able to create a Certificate Signing Request simply without advanced knowledge about signature generators etc.

Code snippet

using var keys = RSA.Create();
var req = new CertificateBuilder().SetKeyPair(keys).ToCertificateRequest();
var csr = req.CreateSigningRequest(); //This line used to not, but now throws an InvalidOperationException

Environment

  • FluentCertificates 0.7.1
  • .NET 6.0

The bug has the severity

  • Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult.

Add method ToCertificateRequest() method to the CertificateBuilder

ToCertificateRequest should generate a .NET CertificateRequest object based on the builder's parameters. Write extension-methods for the CertificateRequest class for exporting as PEM etc.

The ToCsr method should be made obsolete.

The goal is to minimize the library's reliance on the BouncyCastle and use built-in .NET classes wherever possible without sacrificing flexibility.

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.