rustls / rustls-ffi

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

error: adapt rustls_result for upstream changes. #303

Closed cpu closed 1 year ago

cpu commented 1 year ago

This commit adapts the rustls_result enum based on the changes upstream. Notably the CertInvalidEncoding, CertInvalidSignatureType and CertInvalidData errors have been folded into a new CertificateError enum that we expand out into its possible variants. Similarly the CorruptMessage and CorruptMessagePayload types have been replaced by a InvalidMessage enum that we expand out.

Resolves #297.

cpu commented 1 year ago

@jsha I think this branch is ready for review now. The Rust parts all build/test cleanly. The remaining CI failures are from src/client.c using the old dns_name struct field that was renamed. I'll fix that in a separate PR (https://github.com/rustls/rustls-ffi/pull/305) since it's unrelated to the error work.

cpu commented 1 year ago

cpu cpu force-pushed the cpu-297-rustls_result-update branch from 2f9b3d4 to c02b806

This was me remembering the note you left in #302 - I've rolled that InvalidDnsNameError change into this work.

cpu commented 1 year ago

cpu force-pushed the cpu-297-rustls_result-update branch from c02b806 to 96e62ba

Fmt fix.