Skip to content

Commit

Permalink
send non-default curve during a handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDoanRivian committed Sep 20, 2024
1 parent 9c7e41d commit 215a586
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cert/cert_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,16 @@ func (c *certificateV2) MarshalForHandshakes() ([]byte, error) {
//TODO: panic on nil rawDetails
b.AddBytes(c.rawDetails)

// Skipping the curve and public key since those come across in a different part of the handshake
// Skipping public key since those come across in a different part of the handshake

//todo is curve skippable? I don't think so?

// Add the curve only if its not the default value
if c.curve != Curve_CURVE25519 {
b.AddASN1(TagCertCurve, func(b *cryptobyte.Builder) {
b.AddBytes([]byte{byte(c.curve)})
})
}

// Add the signature
b.AddASN1(TagCertSignature, func(b *cryptobyte.Builder) {
Expand Down

0 comments on commit 215a586

Please sign in to comment.