-
Notifications
You must be signed in to change notification settings - Fork 593
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
Remove C++ SSL Certificate API #2132
Conversation
cpp/include/Ice/SSL/Certificate.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to rename this header.
- DistinguishedName can go into an internal header
- Exception would remain public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lools good.
*/ | ||
std::vector<CertificatePtr> certs; | ||
PCCERT_CONTEXT peerCertificate = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Public fields is not a common / recommended style in C++.
It's ok for plain struct but not for such a class. It should be instead:
public:
PCCERT_CONTEXT peerCertificate() const noexcept { return _peerCertificate; }
private:
const PCCERT_CONTEXT _peerCertificate = nullptr;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base class has public fields for other properties, should we fix them in a follow-up PR?
/** | ||
* The peer certificate. | ||
*/ | ||
SecCertificateRef peerCertificate = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
This PR removes the C++ Certificate API,
IceSSL::ConnectionInfo
provides the native peer certificate, (not a certificate chain).