Description of problem: When rhn-custom-info is ran with -s http://<fqdn>, it still requires CA cert from the up2date.conf file. Version-Release number of selected component (if applicable): rhn-custom-info-5.4.26-3.el7sat How reproducible: always Steps to Reproduce: 1. Have a Sat 5.7 server with a client registered, and rhn-custom-info installed on the client. 2. Remove or rename cert file pointed to by the option sslCACert in /etc/sysconfig/rhn/up2date (usually RHN-ORG-TRUSTED-SSL-CERT). 3. Run the following command on the client: rhn-custom-info -u admin -p nimda -s http://<satellite-server-fqdn>rpc/api Actual results: # rhn-custom-info -u admin -p nimda -s http://host-8-178-229.host.centralci.eng.rdu2.redhat.com/rpc/api bla bla1 Traceback (most recent call last): File "/usr/bin/rhn-custom-info", line 250, in <module> main() File "/usr/bin/rhn-custom-info", line 208, in main s = create_server_obj(url) File "/usr/bin/rhn-custom-info", line 77, in create_server_obj raise "could not find cert %s" % ca_cert TypeError: exceptions must be old-style classes or derived from BaseException, not unicode Expected results: Should communicate with server as expected, or notify user he should use https, if we want to force encryption. Additional info: Beside requiring a ca cert for the http communication, there is a problem with the raised exception itself. The exception is not raised correctly, there is simply "raise 'text string'" on line 77 in /usr/bin/rhn-custom-info, which is not valid Python code. Raise must be followed by a class derived from Exception class, not just a text string with an error message.
spacewalk.github: e4dae1b4169557f5811dc8d2a6dfa7329b8fec57 fixed in rhn-custom-info-5.4.33-1
satellite: 4adbb02e66e71b246bf8abdf822aae605682e4aa
Verified on Sat5.8 compose from 2016-12-06. Used reproducer from OP. When using http in rhn-custom-info, info is now correctly set without cert. When using https with incorrect cert, the exception is raised correctly.