Skip to content

feat(gm): support GM #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2025
Merged

Conversation

Zippo-Wang
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@Zippo-Wang Zippo-Wang force-pushed the feat_gm branch 7 times, most recently from 21aed4b to 3bdd2ee Compare April 27, 2025 06:24
Copy link
Collaborator

@chengxiangdong chengxiangdong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is recommended to put gm_round_tripper.go, gm_round_tripper_test.go, logroundtripper.go, logroundtripper_test.go and transport.go in pkg/common/transport.

Comment on lines 158 to 166
VerifyPeerCertificate: func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
for _, v := range rawCerts {
_, err = x509.ParseCertificate(v)
if err != nil {
return err
}
}
return nil
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VerifyPeerCertificate not necessary and should be removed

if c.Global.GMSupport {
gmCfg := &gmtls.Config{
GMSupport: &gmtls.GMSupport{WorkMode: gmtls.ModeAutoSwitch},
InsecureSkipVerify: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InsecureSkipVerify: true,
InsecureSkipVerify: c.Global.Insecure,

if c.Global.GMSupport {
gmCfg := &gmtls.Config{
GMSupport: &gmtls.GMSupport{WorkMode: gmtls.ModeAutoSwitch},
InsecureSkipVerify: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InsecureSkipVerify: true,
InsecureSkipVerify: c.Global.Insecure,

@Zippo-Wang Zippo-Wang force-pushed the feat_gm branch 4 times, most recently from 7995678 to c7837f3 Compare April 28, 2025 08:34
@chengxiangdong
Copy link
Collaborator

/lgtm

@github-actions github-actions bot added the lgtm label Apr 30, 2025
@chengxiangdong chengxiangdong merged commit 32ae536 into huaweicloud:gmtls Apr 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants