rustls / rustls-ffi

Use Rustls from any language
Other
124 stars 31 forks source link

Small AlertDescription and NoneVerifier error fixes. #300

Closed cpu closed 1 year ago

cpu commented 1 year ago

This branch pulls out two easy fixes that don't require any adjustment of the rustls_result enum. The remaining fixes will take a little bit more care so I thought I'd put these up for review first. Updates #297

error: fix AlertDescription import path. - 269f18b697cac6885781a16f705c19c64aae0284

The AlertDescription enum was moved out of rustls::internal::msgs::enums into the top-level API. This commit updates the rustls-ffi import to match.

client: update NoneVerifier err return type. - c73624966a09d3652def5f5c3cab569919c78a5b

The upstream error::InvalidCertificateSignature type was replaced with a differentiated InvalidCertificate error that has a CertificateError::BadSignature variant.

This commit updates the rustls-ffi NoneVerifier to use this more specific error type as its return from verify_server_cert.