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

Decrypt assertion returns wrong error value #94

Closed
sbapu-arista opened this issue Jul 21, 2022 · 1 comment
Closed

Decrypt assertion returns wrong error value #94

sbapu-arista opened this issue Jul 21, 2022 · 1 comment

Comments

@sbapu-arista
Copy link

In decode_response.go post decryption if there is an error in deflating the xml post decryption then the handler returns the error from decryption which will always be nil. It should return the error in parsing the decrypted XML

	raw, derr := encryptedAssertion.DecryptBytes(decryptCert)
	if derr != nil {
		return fmt.Errorf("unable to decrypt encrypted assertion: %v", derr)
	}

	doc, _, err := parseResponse(raw)
	if err != nil {
		return fmt.Errorf("unable to create element from decrypted assertion bytes: %v", derr)
	}

After parseResponse, it returns derr which will always be nil whereas it should be returning err. Is this a wrong expectation or am I missing something here?

@russellhaering
Copy link
Owner

Fixed in #95 and released in v0.8.1 - thanks for reporting!

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

No branches or pull requests

2 participants