I have an SMT server whose hostname is "smt". Using yast ca_mgm, I create a certificate for it, whose common name is "smt".

On the SMT client, I run clientSetup4SMT.sh. After accepting the certificate and agreeing to start the registration, I get this error message:

/usr/bin/SUSEConnect --write-config --url https://smt/center/regsvc
SUSEConnect error: OpenSSL::SSL::SSLError: hostname "smt" does not match the server certificate
I found that the message is generated in Ruby SSL code, but I don't know enough of Ruby to understand what exactly is checked.

Funnily, neither curl nor wget complain about the certificate when they access https://smt.

I also try to use Yast to accomplish registration, and I get "Permission to access 'http://smt/repo/repoindex.xml?cookies=0&credentials=SMT-http_smt' denied." There is no repoindex.xml file under the repo directory - do I have to create one?

Where does the mismatch between hostname and certificate come from? Where can I find more information?
Is the Yast error related to the certificate error? If not, how can I address it?