Skip to content

Adds EC Curves for VaaS's certificatePolicies utils certificate's method "toPolicy" and connector's "buildPolicySpecification" function, as well as adds support for ED25519 curve - #261

Merged
luispresuelVenafi merged 2 commits into
Venafi:masterfrom
inteon:fix_ec
Oct 18, 2022

Conversation

@inteon

@inteon inteon commented Sep 29, 2022 •

Copy link
Copy Markdown
Contributor

This caused the ReadZoneConfiguration function to return an empty keyCurves array for VaaS.

@maelvls

maelvls commented Sep 29, 2022 •

Copy link
Copy Markdown
Contributor

How can I reproduce the bug? Is there a way to reproduce it with a few curl commands? Which version of TPP are you using?

@tr1ck3r

tr1ck3r commented Sep 29, 2022

Copy link
Copy Markdown
Contributor

Do we need to account for VaaS's support for the ED25519 curve and RSA 3072 in https://github.com/Venafi/vcert/blob/master/pkg/certificate/certificate.go? TPP shouldn't have any problems with RSA 3072 even though the UI doesn't support it but TPP doesn't support ED25519 for certificates as far as I'm aware.

@inteon

inteon commented Sep 29, 2022 •

Copy link
Copy Markdown
Contributor Author

Do we need to account for VaaS's support for the ED25519 curve and RSA 3072 in https://github.com/Venafi/vcert/blob/master/pkg/certificate/certificate.go? TPP shouldn't have any problems with RSA 3072 even though the UI doesn't support it but TPP doesn't support ED25519 for certificates as far as I'm aware.

My code is using

func (ec *EllipticCurve) Set(value string) error {
switch strings.ToLower(value) {
case "p521", "p-521":
*ec = EllipticCurveP521
case "p384", "p-384":
*ec = EllipticCurveP384
case "p256", "p-256":
*ec = EllipticCurveP256
default:
*ec = EllipticCurveDefault
}
return nil
}
, so you probably want to add support for the ED25519 curve to this function too.
Maybe a bit out-of-scope for this PR?

@luispresuelVenafi

Copy link
Copy Markdown
Contributor

I already added the missing test cases and fixed another bug regarding getting EC curve when using GetPolicy method on the side of VaaS (Cloud) connector. I needed to add the ED25519 curve in order to work correctly with our issuing template. I believe now we can merge this PR. @marcos-albornoz , @rvelaVenafi , @EduardoVV, could you give your review and approval (if it applies)?

@luispresuelVenafi luispresuelVenafi changed the title VaaS toPolicy should also copy the EC keyCurves Adds EC Curves for VaaS certificateTemplate's toPolicy and buildPolicySpecification function, as well as adds support for ED25519 curve Oct 13, 2022
@luispresuelVenafi luispresuelVenafi changed the title Adds EC Curves for VaaS certificateTemplate's toPolicy and buildPolicySpecification function, as well as adds support for ED25519 curve Adds EC Curves for VaaS's certificatePolicies utils certificate's method "toPolicy" and connector's "buildPolicySpecification" function, as well as adds support for ED25519 curve Oct 13, 2022
@inteon
inteon force-pushed the fix_ec branch 2 times, most recently from cc810c7 to 39e612d Compare October 18, 2022 07:37
@inteon

inteon commented Oct 18, 2022

Copy link
Copy Markdown
Contributor Author

@luispresuelVenafi I rebased the PR, should be ready to merge.

@luispresuelVenafi

Copy link
Copy Markdown
Contributor

Hi @inteon , could you sign your commit? Currently, the missing sign of the commit is blocking the merging of this PR (now signed commits is a requirement to contribute into our projects).

@inteon

inteon commented Oct 18, 2022

Copy link
Copy Markdown
Contributor Author

@luispresuelVenafi done

@luispresuelVenafi

Copy link
Copy Markdown
Contributor

@inteon it still marks it as unverified commit

…en getting policy specificiation. Adds test accordingly and test for getting EC Curves values when calling ReadZoneConfiguration function that calls toPolicy

Co-authored-by: Luis Presuel <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
@inteon

inteon commented Oct 18, 2022 •

Copy link
Copy Markdown
Contributor Author

@luispresuelVenafi sorry for the confusion, I thought you were talking about GH Sign-off instead of signing commits. I signed both commits now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants