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

Remove C++ SSL Certificate API #2132

Merged
merged 12 commits into from
May 9, 2024
Merged

Conversation

pepone
Copy link
Member

@pepone pepone commented May 8, 2024

This PR removes the C++ Certificate API, IceSSL::ConnectionInfo provides the native peer certificate, (not a certificate chain).

@pepone pepone requested a review from bernardnormier May 8, 2024 14:40
Copy link
Member Author

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.

Copy link
Member

@bernardnormier bernardnormier left a 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;
Copy link
Member

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;

Copy link
Member Author

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?

cpp/include/Ice/SSL/ConnectionInfo.h Outdated Show resolved Hide resolved
/**
* The peer certificate.
*/
SecCertificateRef peerCertificate = nullptr;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

cpp/include/Ice/SSL/ConnectionInfoF.h Show resolved Hide resolved
@pepone pepone merged commit d2ec546 into zeroc-ice:main May 9, 2024
16 of 17 checks passed
InsertCreativityHere pushed a commit to InsertCreativityHere/compiler-comparison that referenced this pull request Jan 1, 2025
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

Successfully merging this pull request may close these issues.

2 participants