Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add access methods to Certificate #118

Open
vaffeine opened this issue Feb 15, 2019 · 2 comments
Open

Add access methods to Certificate #118

vaffeine opened this issue Feb 15, 2019 · 2 comments

Comments

@vaffeine
Copy link

Hi,

I need to access server's public key to use it in the NTLM implementation that I am working on.

To do so, I use Certificate::to_der() method and then parse the public key using X509 from OpenSSL. But this, obviously, is not really convenient, because the key is already parsed by native_tls and I need to parse it again with platform dependent code.

I think it would be great to have methods to access certificate fields in a platform-independent way. X509 from OpenSSL provides a lot of methods for it. It is also possible to retrieve some of them with SecCertificateExt on macOS and the PR, that allows to retrieve public certificate, is almost merged into schannel-rs .

I could work on it and create a PR if you don't mind.

@sfackler
Copy link
Owner

Sure - PRs exposing more bits of the system are welcome!

@vaffeine
Copy link
Author

Oh, I actually looked into exising PRs and found, that SergejJurecko has already done simmilar thing in #117. I'll wait until his PR is merged and then try to add more methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants