Using HTTPS on Elastic Agent

I tried to enable SSL on my Elastic Agent communications to use HTTPS like in the doc bellow, but, it didn't worked for me and after trying a lot of things I don't now what else to do. Any help?

Thanks for reaching out, @Victor_Santana. What have you tried that didn't work? Did you get an error message? Do you have a code sample you can share?