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

How are SerialNumber Values Derived #1

Open
rashadrivera opened this issue Apr 12, 2019 · 1 comment
Open

How are SerialNumber Values Derived #1

rashadrivera opened this issue Apr 12, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@rashadrivera
Copy link

Hello All,

I'm trying to figure how the SerialExists & SerialIsRevoked method derive the 'serial' argument value. So for example, when my certificate has a hexadecimal serial number value of '9dd919ba4ead18b78df7382112f9fb6953da22c5', I get the value of '901153053931671044175307656606196330260573332165' for the 'serial' argument.

Also, is there a reason why the value had to be altered? Can I configure the product to return just the hexadecimal value instead of these large numbers?

  • Rashad Rivera
@gabrielcalegari
Copy link
Owner

gabrielcalegari commented Apr 15, 2019

Hello, Rashad!

Internally, we are using a library that supports many X509 certificate operations. That library reads serial number as a BigInteger, a own type.

When you convert the hex 9dd919ba4ead18b78df7382112f9fb6953da22c5 to big integer you get 901153053931671044175307656606196330260573332165

You can see this in https://www.mobilefish.com/services/big_number/big_number.php

For this moment, we do not have the option to work with other type than big integer as string. But on your Repository implementation you can convert it to hexadecimal before you use it.

I will take your comment into account for the next release.

@gabrielcalegari gabrielcalegari added the enhancement New feature or request label Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants