I suppose the process depend of agent's version (and libraries like SSLeay ...).
When you set SSL=1, you have to install with agent a certificate file (CaBundle=xxxx for Windows agent, ca=xxxx for Linux agent). This certificate is a copy of public certificate of OCS web server.
I suppose agent try to connect to OCS server and make a comparison between local certificate file and the certificate of web server.
I'm not sure agent do a check of the certificate of web server as modern browser does ...
Modern browser (Firefox, Chome, ...) are able to check a web server (public) certificate to look if the certificate is signed by an Authority like Amazon, Atos, Affirm Trust, certSIGN, Comodo, ...
OCS Agent don't have this list of Authority, so it can use only the copy of certificate installed to check the (public) certificate of OCS web server.
IMHO this check is very poor due it's a copy (and it's easy to get the certificate of OCS server).
If you want to pollute an OCS server (which use HTTPS), you search for name of OCS server (easy), you get the certificate (easy) and you could create a false hardware, inventory, change the name, inventory, and so ...
I suppose this url
https://stackoverflow.com/questions/74358/how-can-i-get-lwp-to-validate-ssl-server-certificates (2008) give a context of this situation : OCS agent (Linux) use perl and LWP + SSLeay librairies ...