gmssl icon indicating copy to clipboard operation
gmssl copied to clipboard

[bug] sm2的public key lstrip有问题

Open wklken opened this issue 2 years ago • 0 comments

https://github.com/duanhongyi/gmssl/blob/master/gmssl/sm2.py#L25

self.public_key = public_key.lstrip("04") if public_key.startswith("04") else public_key

should be

self.public_key = public_key[2:] if public_key.startswith("04") else public_key

wklken avatar Feb 07 '23 08:02 wklken