Skip to content

Pkcs10CertificationRequest adding in repated '/' when converted to base64 string #424

Closed Answered by mattsetaro
mattsetaro asked this question in Q&A
Discussion options

You must be logged in to vote

Was able to figure out the solution, it had to do with the keys that were being generated and used in the CSR.

Here is what the code to generate the keys looked like:

        X9ECParameters x9ec = ECNamedCurveTable.GetByName("P-256");
        ECDomainParameters ecDomain = new ECDomainParameters(x9ec.Curve, x9ec.G, x9ec.N, x9ec.H, x9ec.GetSeed());

        ECKeyPairGenerator generator = (ECKeyPairGenerator)GeneratorUtilities.GetKeyPairGenerator("ECDH");
        generator.Init(new ECKeyGenerationParameters(ecDomain, new SecureRandom()));

        // return our generated keys
        return generator.GenerateKeyPair();

And what I changed it to:

        ECKeyPairGenerator generator = (ECKeyP…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@mattsetaro
Comment options

@mattsetaro
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mattsetaro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants