[Fedora-directory-commits] mod_nss nss_engine_vars.c, 1.5, 1.6 mod_nss.h, 1.10, 1.11 nss_engine_init.c, 1.17, 1.18 nss_engine_io.c, 1.5, 1.6 nss_engine_kernel.c, 1.4, 1.5 nss_engine_log.c, 1.3, 1.4 nss_engine_pphrase.c, 1.4, 1.5

Robert Crittenden (rcritten) fedora-directory-commits at redhat.com
Fri Apr 7 20:17:15 UTC 2006


Author: rcritten

Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23192

Modified Files:
	nss_engine_vars.c mod_nss.h nss_engine_init.c nss_engine_io.c 
	nss_engine_kernel.c nss_engine_log.c nss_engine_pphrase.c 
Log Message:
188300

Replace C++ style comments to make the Sun Forte compiler happy.



Index: nss_engine_vars.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_vars.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- nss_engine_vars.c	2 Mar 2006 19:21:54 -0000	1.5
+++ nss_engine_vars.c	7 Apr 2006 20:17:12 -0000	1.6
@@ -16,6 +16,7 @@
 #include "mod_nss.h"
 #include "secder.h"     /* DER_GetInteger() */
 #include "base64.h"     /* BTOA_DataToAscii() */
+#include "cert.h"       /* CERT_* */
 
 /*  _________________________________________________________________
 **
@@ -391,7 +392,7 @@
         rv = CERT_GetCountryName(cert);
     } else if (strcEQ(var, "ST")) {
         rv = CERT_GetStateName(cert);
-    } else if (strcEQ(var, "SP")) { // for compatibility
+    } else if (strcEQ(var, "SP")) { /* for compatibility */
         rv = CERT_GetStateName(cert);
     } else if (strcEQ(var, "L")) {
         rv = CERT_GetLocalityName(cert);
@@ -406,12 +407,12 @@
     } else if (strcEQ(var, "EMAIL")) {
         rv = CERT_GetCertEmailAddress(cert);
     } else {
-        rv = NULL; // catch any values we don't support
+        rv = NULL; /* catch any values we don't support */
     }
 
     if (rv) {
         result = apr_pstrdup(p, rv);
-        PORT_Free(rv); // so we can free with the right allocator
+        PORT_Free(rv); /* so we can free with the right allocator */
     }
 
     return result;
@@ -533,7 +534,7 @@
         if (rv == SECSuccess)
             result = "SUCCESS";
         else
-            result = apr_psprintf(p, "FAILED"); // FIXME, add more info?
+            result = apr_psprintf(p, "FAILED"); /* FIXME, add more info? */
     }
 
     if (xs)


Index: mod_nss.h
===================================================================
RCS file: /cvs/dirsec/mod_nss/mod_nss.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mod_nss.h	2 Mar 2006 19:21:54 -0000	1.10
+++ mod_nss.h	7 Apr 2006 20:17:12 -0000	1.11
@@ -323,7 +323,7 @@
     const char *name;
     int num;
     int fortezza_only;
-    PRInt32 version; // protocol version valid for this cipher
+    PRInt32 version; /* protocol version valid for this cipher */
 } cipher_properties;
 
 /* Compatibility between Apache 2.0.x and 2.2.x. The numeric version of


Index: nss_engine_init.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_init.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- nss_engine_init.c	2 Mar 2006 19:21:54 -0000	1.17
+++ nss_engine_init.c	7 Apr 2006 20:17:12 -0000	1.18
@@ -872,7 +872,7 @@
     switch (certtimestatus)
     {
         case secCertTimeValid:
-            // ok
+            /* ok */
             break;
         case secCertTimeExpired:
             ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
@@ -1175,10 +1175,11 @@
             PRUint32 matchedUsage = 0;
             PRBool isValid = PR_FALSE;
             PRBool swapcert = PR_FALSE;
-            // We still need to check key usage. Dual-key certs appear
-            // as 2 certs in the list with different usages. We want to pick
-            // the "best" one, preferrably the one with certUsageSSLServer.
-            // Otherwise just return the cert if the nickname matches.
+            /* We still need to check key usage. Dual-key certs appear
+             * as 2 certs in the list with different usages. We want to pick
+             * the "best" one, preferrably the one with certUsageSSLServer.
+             * Otherwise just return the cert if the nickname matches.
+             */
             if (CERT_CheckCertUsage(cert, certUsageSSLServer) == SECSuccess) {
                 matchedUsage = 2; 
             } else {
@@ -1190,24 +1191,27 @@
 
             if (secCertTimeValid == CERT_CheckCertValidTimes(cert, PR_Now(), PR_FALSE))
             {
-                // This is a valid certificate.
+                /* This is a valid certificate. */
                 isValid = PR_TRUE;
             }
             if (!bestcert) {
-                // We didn't have a cert picked yet, automatically choose this
-                // one.
+                /* We didn't have a cert picked yet, automatically choose this
+                 * one.
+                 */
                 swapcert = PR_TRUE;
             } else {
                 if (matchedUsage > bestCertMatchedUsage) {
-                    // The cert previously picked didn't have the correct
-                    // usage, but this one does. Choose this one.
+                    /* The cert previously picked didn't have the correct
+                     * usage, but this one does. Choose this one.
+                     */
                     swapcert = PR_TRUE;
                 } else {
                     if ( (bestCertMatchedUsage == matchedUsage) &&
                     (((PR_FALSE == bestCertIsValid) && (PR_TRUE == isValid)) ||
                     ((PR_TRUE == bestCertIsValid == isValid) && (PR_TRUE == cert_IsNewer(cert, bestcert))))) {
-                        // The cert previously picked was invalid but this one
-                        // is. Or they were both valid but this one is newer.
+                        /* The cert previously picked was invalid but this one
+                         * is. Or they were both valid but this one is newer.
+                         */
                         swapcert = PR_TRUE;
                     }
                 }


Index: nss_engine_io.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_io.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- nss_engine_io.c	2 Mar 2006 19:21:54 -0000	1.5
+++ nss_engine_io.c	7 Apr 2006 20:17:12 -0000	1.6
@@ -1138,7 +1138,7 @@
     int rc = 1;
 
     if (gIdentity != PR_INVALID_IO_LAYER) {
-        // already initialized
+        /* already initialized */
         return PR_FAILURE;
     }
 


Index: nss_engine_kernel.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_kernel.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- nss_engine_kernel.c	2 Mar 2006 19:21:54 -0000	1.4
+++ nss_engine_kernel.c	7 Apr 2006 20:17:12 -0000	1.5
@@ -435,7 +435,7 @@
                 return HTTP_FORBIDDEN;
             }
 
-            // The cert is ok, fall through to the check SSLRequires
+            /* The cert is ok, fall through to the check SSLRequires */
         }
         else {
             int handshake_done = 0;


Index: nss_engine_log.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_log.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nss_engine_log.c	24 Feb 2006 20:16:24 -0000	1.3
+++ nss_engine_log.c	7 Apr 2006 20:17:12 -0000	1.4
@@ -306,7 +306,7 @@
     error = PR_GetError();
 
     if ((error >= NSPR_ERROR_BASE) && (error <= NSPR_MAX_ERROR)) {
-        return; // We aren't logging NSPR errors
+        return; /* We aren't logging NSPR errors */
     } else if ((error >= LIBSEC_ERROR_BASE) &&
         (error <= LIBSEC_MAX_ERROR)) {
         err = libsec_errors[error-LIBSEC_ERROR_BASE].errorString;


Index: nss_engine_pphrase.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_pphrase.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- nss_engine_pphrase.c	4 Jan 2006 22:07:58 -0000	1.4
+++ nss_engine_pphrase.c	7 Apr 2006 20:17:12 -0000	1.5
@@ -79,7 +79,7 @@
             status = SECFailure;
             break;
         }
-        parg->retryCount = 0; // reset counter to 0 for the next token
+        parg->retryCount = 0; /* reset counter to 0 for the next token */
         PK11_FreeSlot(slot);
     }
     
@@ -107,11 +107,11 @@
     }
     prompt = PR_smprintf("Please enter password for \"%s\" token:", PK11_GetTokenName(slot));
     if (parg == NULL) {
-        // should not happen
+        /* should not happen */
         passwd = nss_get_password(stdin, stdout, slot, nss_check_password, 0);
     } else {
         if (parg->retryCount > 2) {
-            passwd = NULL; // abort after 2 retries (3 failed attempts)
+            passwd = NULL; /* abort after 2 retries (3 failed attempts) */
         } else {
             passwd = nss_get_password(stdin, stdout, slot, nss_check_password, parg);
         }




More information about the Fedora-directory-commits mailing list