[Pkg-fedora-ds-maintainers] [libapache2-mod-nss] 62/156: 188300

Timo Aaltonen tjaalton-guest at moszumanska.debian.org
Wed Jul 2 13:55:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

tjaalton-guest pushed a commit to branch master
in repository libapache2-mod-nss.

commit 7eed0dc4bb3c6c1308d164da88aef0c7246b142d
Author: rcritten <>
Date:   Fri Apr 7 20:17:12 2006 +0000

    188300
    
    Replace C++ style comments to make the Sun Forte compiler happy.
---
 mod_nss.h            |  2 +-
 nss_engine_init.c    | 28 ++++++++++++++++------------
 nss_engine_io.c      |  2 +-
 nss_engine_kernel.c  |  2 +-
 nss_engine_log.c     |  2 +-
 nss_engine_pphrase.c |  6 +++---
 nss_engine_vars.c    |  9 +++++----
 7 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/mod_nss.h b/mod_nss.h
index da868bd..d484ea2 100644
--- a/mod_nss.h
+++ b/mod_nss.h
@@ -323,7 +323,7 @@ typedef struct
     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
diff --git a/nss_engine_init.c b/nss_engine_init.c
index 3333002..a49f53b 100644
--- a/nss_engine_init.c
+++ b/nss_engine_init.c
@@ -872,7 +872,7 @@ static void nss_init_certificate(server_rec *s, const char *nickname,
     switch (certtimestatus)
     {
         case secCertTimeValid:
-            // ok
+            /* ok */
             break;
         case secCertTimeExpired:
             ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
@@ -1175,10 +1175,11 @@ FindServerCertFromNickname(const char* name)
             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 @@ FindServerCertFromNickname(const char* name)
 
             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;
                     }
                 }
diff --git a/nss_engine_io.c b/nss_engine_io.c
index 6d8d950..64641d8 100644
--- a/nss_engine_io.c
+++ b/nss_engine_io.c
@@ -1138,7 +1138,7 @@ int nss_io_layer_init()
     int rc = 1;
 
     if (gIdentity != PR_INVALID_IO_LAYER) {
-        // already initialized
+        /* already initialized */
         return PR_FAILURE;
     }
 
diff --git a/nss_engine_kernel.c b/nss_engine_kernel.c
index 84323c8..b8de991 100644
--- a/nss_engine_kernel.c
+++ b/nss_engine_kernel.c
@@ -435,7 +435,7 @@ int nss_hook_Access(request_rec *r)
                 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;
diff --git a/nss_engine_log.c b/nss_engine_log.c
index bc3e3e0..ca68d18 100644
--- a/nss_engine_log.c
+++ b/nss_engine_log.c
@@ -306,7 +306,7 @@ void nss_log_nss_error(const char *file, int line, int level, server_rec *s)
     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;
diff --git a/nss_engine_pphrase.c b/nss_engine_pphrase.c
index 7dbc2a9..da6bffb 100644
--- a/nss_engine_pphrase.c
+++ b/nss_engine_pphrase.c
@@ -79,7 +79,7 @@ SECStatus nss_Init_Tokens(server_rec *s)
             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 @@ static char * nss_password_prompt(PK11SlotInfo *slot, PRBool retry, void *arg)
     }
     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);
         }
diff --git a/nss_engine_vars.c b/nss_engine_vars.c
index f5fb045..a6e2fe8 100644
--- a/nss_engine_vars.c
+++ b/nss_engine_vars.c
@@ -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 @@ static char *nss_var_lookup_nss_cert_dn(apr_pool_t *p, CERTName *cert, char *var
         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 @@ static char *nss_var_lookup_nss_cert_dn(apr_pool_t *p, CERTName *cert, char *var
     } 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 @@ static char *nss_var_lookup_nss_cert_verify(apr_pool_t *p, conn_rec *c)
         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)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-fedora-ds/libapache2-mod-nss.git



More information about the Pkg-fedora-ds-maintainers mailing list