Trees | Indices | Help |
---|
|
1 # 2 # Copyright (c) 2008--2016 Red Hat, Inc. 3 # 4 # This software is licensed to you under the GNU General Public License, 5 # version 2 (GPLv2). There is NO WARRANTY for this software, express or 6 # implied, including the implied warranties of MERCHANTABILITY or FITNESS 7 # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 8 # along with this software; if not, see 9 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 10 # 11 # Red Hat trademarks are not licensed under GPLv2. No permission is 12 # granted to use or replicate Red Hat trademarks that are incorporated 13 # in this software or its documentation. 14 # 15 # Satellite only package downloading methods. 16 17 # common imports 18 from spacewalk.common.rhnLog import log_debug 19 from spacewalk.common.rhnException import rhnException 20 21 # server imports 22 from spacewalk.server import rhnSQL 23 from auth import Authentication 24 2527 28 """ Downloads the satellite cert """ 29 365838 log_debug(3) 39 self.auth_system(system_id) 40 41 server_id = self.server.server['id'] 42 h = rhnSQL.prepare(""" 43 select cert 44 from rhnSatelliteInfo si 45 where si.server_id = :server_id""") 46 h.execute(server_id=server_id) 47 row = h.fetchone_dict() 48 if not row: 49 # This should not happen - we're already authenticated 50 raise rhnException("Satellite cert went away after auth?") 51 52 # Bugzilla #219625 53 # cert is now a blob 54 cert = row['cert'] 55 cert = cert.read() 56 57 return cert
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Mar 4 07:37:51 2020 | http://epydoc.sourceforge.net |