Description of problem: While registering host with Global Registration Curl getting error: ~~~ curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate." ~~~ But no error while registering with activation key. Steps to Reproduce: 1. Generate the Global Registration Curl command: ~~~ curl -X GET "https://satellite.example.com/register?activation_key=ak1&location_id=2&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTIxNjM2NDksImp0aSI6IjJiYzgwMDU3MTU3ZTQzYzUyZGVkYjJkOTgxYWNkYjVmZWM3OWU3ZTRiNGE1YjI1NmUyNmRlNDg0NWNlNDI4ZjYiLCJleHAiOjE2MTIxNzgwNDl9.CvfajFDVXH9f-_VC0LlJh0mQaGUJcmsOsRl1q1L8OWY' | bash ~~~ 2. Register the host ~~~ # curl -X GET "https://satellite.example.com/register?activation_key=ak1&location_id=2&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTIxNjM2NDksImp0aSI6IjJiYzgwMDU3MTU3ZTQzYzUyZGVkYjJkOTgxYWNkYjVmZWM3OWU3ZTRiNGE1YjI1NmUyNmRlNDg0NWNlNDI4ZjYiLCJleHAiOjE2MTIxNzgwNDl9.CvfajFDVXH9f-_VC0LlJh0mQaGUJcmsOsRl1q1L8OWY' | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate. ~~~ 3. If same host is registered using activation key: ~~~ # subscription-manager register --org="Default_Organization" --activationkey="ak1" The system has been registered with ID: xxxxxxx-xxxx-xxxxxxx-xxxxxxxxx ~~~ Actual results: Unable to register host with Global Registration Curl Command once the host hit error: ~~~ curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate. ~~~ Expected results: Registration with Global Registration Curl Command should work if registration with activation key works.
See https://bugzilla.redhat.com/show_bug.cgi?id=1922867#c4 *** This bug has been marked as a duplicate of bug 1922867 ***