Server Connection with X.509 Key from Trusted Authority

Using the MKR NB1500, I successfully followed the tutorial in this link:

The tutorial, however, uses a self-signed certificate to establish a connection to Microsoft Azure IoT hub. In my case, I would like to establish a connection generating my own X.509 certificate having certificate-authority. I was able to find a github repo on generating all of the required certificates, but the example code does not use the NBSSL class. That example can be found here:

To summarize, I want to establish a secure server connection with Arduino's NBSSL class using my own generated certificate-authority certificate. Thanks in advance.