Skip to content

Certificate XML encoding #25

@lucasperin

Description

@lucasperin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions