Skip to content

Added SSLPluginInterface.h to the Makefile alogside other exported he… - #1574

Open
borisBozicGet wants to merge 1 commit into
eclipse-paho:developfrom
borisBozicGet:adding-callback-function-for-handling-SSL-Object-at-SSLConnect
Open

Added SSLPluginInterface.h to the Makefile alogside other exported he…#1574
borisBozicGet wants to merge 1 commit into
eclipse-paho:developfrom
borisBozicGet:adding-callback-function-for-handling-SSL-Object-at-SSLConnect

Conversation

@borisBozicGet

Copy link
Copy Markdown
  • Created and added SSLPluginInterface.h alongside other exported header files.
  • Added a callback function for handling the SSL object passed as an input parameter in the SSLSocket_Connect
    function.

What does this functionality provide?
This functionality is essential in cybersecurity as it enables users to obtain an X509 Certificate from the SSL object and verify the device attempting to connect. Users can include the SSLPluginInterface.h file in their project and set the callback function "SSLPluginInterface_setcallback(int (callback)(SSL))" with their implementation.

Thank you for your interest in this project managed by the Eclipse Foundation.

The guidelines for contributions can be found in the CONTRIBUTING.md file.

At a minimum, you must sign the Eclipse ECA, and sign off each commit.

To complete and submit a ECA, log into the Eclipse projects forge
You will need to create an account with the Eclipse Foundation if you have not already done so.
Be sure to use the same email address when you register for the account that you intend to use when you commit to Git.
Go to https://accounts.eclipse.org/user/eca to sign the Eclipse ECA.

…aderfiles. Added callback function for handling SSL object passed through as an inparameter in SSLSocket_Connect function.

Signed-off-by: Boris Bozic u4030882 <u4030882@C2000181.getingegroup.local>
@icraggs

icraggs commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

I don't think this is the way I would want to allow people to get a pointer to the SSL object - it doesn't follow any of the API conventions but is instead a back door.

You would have to sign the Eclipse ECA for a pull request to be accepted (see the checks and the template for PRs.)

What exactly are you expecting people to do with the SSL object once they've got it? What we do already is:

  • X509_check_host
  • X509_check_ip_asc
    on the peer certfificate if verify is used.

@borisBozicGet

Copy link
Copy Markdown
Author

Hi! Thank you for answering, ok then i will do that.
When you get access to the SSL object you can extract the "Certificate Template" extension.
It helps in identifying the type of certificate that was issued based on the predefined templates available in the CA's infrastructure. This is useful in where different types of certificates are issued for different purposes for example user certificates, server certificates and other.
We need the functionalities to react to the Certificate properties, we would only need the X509 object, but we choose to use SSL object because it was more generic.

We could change it to:
"SSLPluginInterface_setcallback(int (callback)(X509))", that would work for us, is this a good solution for this? Or is it something that could be implemented from you?

@borisBozicGet borisBozicGet reopened this Sep 10, 2025
@borisBozicGet

Copy link
Copy Markdown
Author

@icraggs
Hi!
if we would changed it to:
"SSLPluginInterface_setcallback(int (callback)(X509))"

Would that work? Or do you have a different proposal?

@icraggs icraggs added this to the 1.4.0 milestone Sep 16, 2025
@icraggs

icraggs commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

Yes I prefer the callback to return the OpenSSL object. I'll look into adding that capability into the 1.4.0 branch.

@borisBozicGet

Copy link
Copy Markdown
Author

@icraggs
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants