Closed rathorearvind19 closed 9 months ago
r
and s
are converted to a fixed number of bytes n
, which is the size of the key in octets (not the minimum size of each), making r
and s
of equal length. Can you provide an example of the problem you are experiencing?
Ok. I see that it's correctly handled now. I referred to to_bytes function in utils by mistake.
Will check why I was getting incorrectly formatted signature in one of the certs I generated.
Closing the issue.
I've run into a certificate which doesn't have correctly encoded signature for ECC algorithms. The problem is that the r and s components of ECDSA signature are encoded to minimum number of bytes required to fit those integers. However, they should be encoded to fixed number of bytes (derived based on the curve size, e.g. 32 bytes for P256, 28 bytes for P224, 24 bytes for P192, and so on). Could you please look into it and fix the issue?
From certificates.py: