Skip to content
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

Update IKE #6

Merged
merged 33 commits into from
Sep 18, 2024
Merged

Update IKE #6

merged 33 commits into from
Sep 18, 2024

Conversation

allen0091
Copy link
Contributor

  • Add decrypt and encrypt
  • Add sha256 algorithm
  • Remove XFRM related code

@ianchen0119
Copy link

Please resolve the conflicts.

Payloads IKEPayloadContainer
}

func ParseIkeHeader(b []byte) (*IKEMessage, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

return (*IKEHeader, error)

ike.go Outdated
@@ -29,25 +29,25 @@ func EncodeEncrypt(
// and get IKESA
func DecodeDecrypt(
msg []byte,
ikeMsg *message.IKEMessage,
Copy link
Contributor

Choose a reason for hiding this comment

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

ikeHdr *IKEHeader

ike.go Outdated
ikeMsg := new(message.IKEMessage)
err := ikeMsg.Decode(msg)
) error {
err := ikeMsg.Decode(msg[message.IKE_HEADER_LEN:])
Copy link
Contributor

Choose a reason for hiding this comment

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

ikeMsg := new(message.IKEMessage)
if ikeHdr == nil {
    err := ikeMsg.Decode(msg)
} else {
    ikeMsg.IKEHeader = ikeHdr
    err := ikeMsg.DecodePayload(msg[msg[message.IKE_HEADER_LEN:])
}

@tim-ywliu tim-ywliu merged commit 1ee5ab8 into free5gc:main Sep 18, 2024
2 checks passed
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.

3 participants