Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora User (http://www.linux-archive.org/fedora-user/)
-   -   ssl: propagate 'url --trustedssl' into yum repo configuration (#599040). (http://www.linux-archive.org/fedora-user/394122-ssl-propagate-url-trustedssl-into-yum-repo-configuration-599040-a.html)

Ales Kozumplik 07-02-2010 12:56 PM

ssl: propagate 'url --trustedssl' into yum repo configuration (#599040).
 
---
anaconda | 4 ++++
loader/loader.c | 4 ++++
pyanaconda/flags.py | 1 +
pyanaconda/yuminstall.py | 3 +++
4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/anaconda b/anaconda
index c01260e..b1bc9a5 100755
--- a/anaconda
+++ b/anaconda
@@ -197,6 +197,7 @@ def parseOptions(argv = None):
op.add_option("-m", "--method", dest="method", default=None)
op.add_option("--repo", dest="method", default=None)
op.add_option("--stage2", dest="stage2", default=None)
+ op.add_option("--trustedssl", action="store_true", default=False)

op.add_option("--liveinst", action="store_true", default=False)

@@ -591,6 +592,9 @@ if __name__ == "__main__":

anaconda.stage2 = opts.stage2

+ if opts.trustedssl:
+ flags.trustedssl = True
+
if opts.liveinst:
flags.livecdInstall = True

diff --git a/loader/loader.c b/loader/loader.c
index bd7bb05..1d7efd9 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -2375,6 +2375,10 @@ int main(int argc, char ** argv) {
}
}

+ if (loaderData.instRepo_trustedssl) {
+ *argptr++ = "--trustedssl";
+ }
+
if (loaderData.proxy && strcmp("", loaderData.proxy)) {
*argptr++ = "--proxy";

diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index af6216c..900c355 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -93,6 +93,7 @@ class Flags:
self.__dict__['flags']['useIPv6'] = True
self.__dict__['flags']['sshd'] = 0
self.__dict__['flags']['preexisting_x11'] = False
+ self.__dict__['flags']['trustedssl'] = False
# for non-physical consoles like some ppc and sgi altix,
# we need to preserve the console device and not try to
# do things like bogl on them. this preserves what that
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index 6a239d5..05a6977 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -585,6 +585,9 @@ class AnacondaYum(YumSorter):
if self.anaconda.proxy:
repo.setProxy(self.anaconda)

+ if flags.trustedssl:
+ repo.sslverify = False
+
repo.enable()
self.repos.add(repo)

--
1.7.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 07:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.