rpms/crypto-utils/F-10 keyutil.c,1.13,1.14

Elio Maldonado emaldonado at fedoraproject.org
Tue Feb 17 22:10:34 UTC 2009


Author: emaldonado

Update of /cvs/extras/rpms/crypto-utils/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6510

Modified Files:
	keyutil.c 
Log Message:
Moved test for null subject ahead of key genration and fixed a missing ! when testing whether base64 encoding succeded


Index: keyutil.c
===================================================================
RCS file: /cvs/extras/rpms/crypto-utils/F-10/keyutil.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- keyutil.c	29 Jan 2009 22:54:38 -0000	1.13
+++ keyutil.c	17 Feb 2009 22:10:03 -0000	1.14
@@ -1304,8 +1304,10 @@
             do {
                 
                 b64 = BTOA_ConvertItemToAscii(src);
-                if (b64)
-                	break;
+                if (!b64) {
+                    rc = 255;
+                	GEN_BREAK(rv);
+                }
                 
                 total = PL_strlen(b64);
                 
@@ -1468,6 +1470,12 @@
          * This is a certificate signing request for a new cert,
          * will generate a key pair
          */
+
+        if (!subjectstr) {
+            SECU_PrintError(progName, "subject string was NULL\n");
+            rv = 255;
+            goto shutdown;
+        }
         slot = PK11_GetInternalKeySlot(); /* PK11_GetInternalSlot() ? */
 
         privkey = GenerateRSAPrivateKey(keytype, slot,
@@ -1480,11 +1488,6 @@
             goto shutdown;
         }
 
-        if (!subjectstr) {
-            SECU_PrintError(progName, "subject string was NULL\n");
-            rv = 255;
-            goto shutdown;
-        }
         subject = CERT_AsciiToName((char *)subjectstr);
         if (!subject) {
             SECU_PrintError(progName,




More information about the fedora-extras-commits mailing list