When loading certain public keys through oscrypto.asymetric.load_certificate then trying to inspect any property (say algorithm) an OSError such as OSStatus 62339392 is thrown. The exact error code is always different but undefined within Apple docs.
The error appears to be coming from SecCertificateCopyPublicKey(_:) which I note has been deprecated for a long time now in favour of SecCertificateCopyKey(_:)
System Version: macOS 13.0 (22A5321d)
Kernel Version: Darwin 22.0.
I have confirmed that changing SecCertificateCopyPublicKey(_:) to SecCertificateCopyKey(_:) fixes the error. I will make a PR shortly with this change.
When loading certain public keys through
oscrypto.asymetric.load_certificate
then trying to inspect any property (sayalgorithm
) an OSError such asOSStatus 62339392
is thrown. The exact error code is always different but undefined within Apple docs.The error appears to be coming from
SecCertificateCopyPublicKey(_:)
which I note has been deprecated for a long time now in favour ofSecCertificateCopyKey(_:)
System Version: macOS 13.0 (22A5321d) Kernel Version: Darwin 22.0.
Example cert:
Minimum reproducing code: