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

Certificate XML encoding #25

Open
lucasperin opened this issue Oct 10, 2018 · 0 comments
Open

Certificate XML encoding #25

lucasperin opened this issue Oct 10, 2018 · 0 comments

Comments

@lucasperin
Copy link
Collaborator

There are two Certificate XML encoding functions in the Certificate class.
Both functions do the same thing, except that one converts the serial to decimal using the BigInteger class.

Since the serial can have (and usually has) length larger than 32 bits, it would be best if we always used BigInteger conversion. This approach handles both 32 to any bit precision for serial encoding gracefully, wehereas the approach with log/int does not.

Additionally, the serial should be encoded as HEX and not Decimal.

I propose using a deprecated tag to the integer solution and make it return a call to the BigInteger function. Also, changing the toDec() to toHex() should be a better solution to both.

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

1 participant