diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rwxr-xr-x | src/fedora-cvs.py | 17 |
5 files changed, 16 insertions, 12 deletions
@@ -1,3 +1,6 @@ +* Dennis Gilmore <dennis@ausil.us> - 0.3.0 +- use pyOpenSSL to determine username +- make sure cert is valid * Dennis Gilmore <dennis@ausil.us> - 0.2.0 - fedora-cvs now allows checking out multiple modules - update urls for fedorahosted @@ -66,7 +66,7 @@ AUTOMAKE = ${SHELL} /home/dennis/code/fedora-packager/missing --run automake-1.1 AWK = gawk BASH = /bin/sh CYGPATH_W = echo -DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fedora-packager\" -DVERSION=\"0.2.0\" +DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fedora-packager\" -DVERSION=\"0.3.0\" ECHO_C = ECHO_N = -n ECHO_T = @@ -91,7 +91,7 @@ PYTHON = /usr/bin/python SET_MAKE = SHELL = /bin/sh STRIP = -VERSION = 0.2.0 +VERSION = 0.3.0 abs_builddir = /home/dennis/code/fedora-packager abs_srcdir = /home/dennis/code/fedora-packager abs_top_builddir = /home/dennis/code/fedora-packager @@ -1969,7 +1969,7 @@ fi # Define the identity of the package. PACKAGE=fedora-packager - VERSION=0.2.0 + VERSION=0.3.0 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index 872cd07..401be47 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT -AM_INIT_AUTOMAKE(fedora-packager,0.2.0) +AM_INIT_AUTOMAKE(fedora-packager,0.3.0) AC_PATH_PROGS(PYTHON, python) AC_PATH_PROGS(BASH, sh bash) AC_OUTPUT(Makefile) diff --git a/src/fedora-cvs.py b/src/fedora-cvs.py index 3ca9bb8..956ecc8 100755 --- a/src/fedora-cvs.py +++ b/src/fedora-cvs.py @@ -4,6 +4,7 @@ import os import string import sys import commands +from OpenSSL import crypto def readUser(): ''' sample line "Subject: C=US, ST=North Carolina, O=Fedora Project, OU=Dennis Gilmore, CN=ausil/emailAddress=dennis@ausil.us" ''' @@ -14,14 +15,14 @@ def readUser(): print "!!! cannot read your ~/.fedora.cert file !!!" print "!!! Ensure the file is readable and try again !!!" os.exit(1) - for certLine in userCert.split("\n"): - if not len(certLine): - continue - stripCertLine = certLine.strip() - if stripCertLine.startswith("Subject: "): - subjectLine = certLine.split("CN=") - name = subjectLine[1].split("/") - return name[0] + myCert = crypto.load_certificate(1, userCert) + if myCert.has_expired(): + print "Certificate expired please get a new one" + sys.exit(1) + subject = str(myCert.get_subject()) + subjectLine = subject.split("CN=") + name = subjectLine[1].split("/") + return name[0] def cvsco(user, module): |