The error when connecting to the server or as an end user:

The cert is for the gateway. When you log in via a remote desktop gateway, you first have to authenticate against it, but in order to make sure the site is legitimate and safe, Microsoft requires you to use an SSL provided by a known CA authority. 

If you go to https://yourdnsname/rdweb in any browser, you'll notice that the site is secure and legitimate. Once you authenticate against the gateway you are then sent to the session server which is the one you are seeing on the ssl warning.
That certificate is not from a known CA authority, it's just a self signed certificate. That is why you are getting that message when you log in.

Did this answer your question?