[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] 0048-0050 Fedora 24 fixes



Hi,

here are the patches for Fedora 24. They address G++, javac and pylint
issues caused by new versions of GCC, Tomcat and pylint.

https://fedorahosted.org/pki/attachment/ticket/2221
https://fedorahosted.org/pki/attachment/ticket/2222
https://fedorahosted.org/pki/attachment/ticket/2223

Christian
From fb44dd6ce0d3ad426dbfd7b63a62878d4dd69efb Mon Sep 17 00:00:00 2001
From: Christian Heimes <cheimes redhat com>
Date: Thu, 25 Feb 2016 10:42:51 +0100
Subject: [PATCH 1/3] Fix compile issue in RA_Token.cpp
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

GCC 6 is more strict than GCC 5 and earlier. It refuses to initialize a
char[] with 'int' initializers because char is signed while the its are
values from 0 to 255.

RA_Token.cpp:989:7: error: narrowing conversion of ‘194’ from ‘int’ to
‘char’ inside { }

https://fedorahosted.org/pki/attachment/ticket/2221
---
 base/tps-client/tools/raclient/RA_Token.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/tps-client/tools/raclient/RA_Token.cpp b/base/tps-client/tools/raclient/RA_Token.cpp
index dd5170c4c52b1234f7232ff585dfd6ca401e23cc..ec8307366bf226a27dc3eb739f5c1e78992e9a34 100644
--- a/base/tps-client/tools/raclient/RA_Token.cpp
+++ b/base/tps-client/tools/raclient/RA_Token.cpp
@@ -977,7 +977,7 @@ Sign (SECOidTag sigAlg, SECKEYPrivateKey * privKey, Buffer & blob)
         }
 
       /*fake proof for ECC until it works*/
-      char fake_proof [] = {
+      unsigned char fake_proof [] = {
             0x30 ,0x44 ,0x02 ,0x20 ,0x00,
             0xd6 ,0xc2 ,0x08 ,0x34 ,0x79 ,0x28 ,0x2e ,0x5f ,0x70 ,0xe5,
             0x38 ,0x1d ,0x84 ,0xa9 ,0x40 ,0x05 ,0x65 ,0x67 ,0x0f ,0x65,
-- 
2.5.0

From e6adb6ec835462ecd247315f7928e964a0e21e31 Mon Sep 17 00:00:00 2001
From: Christian Heimes <cheimes redhat com>
Date: Thu, 25 Feb 2016 12:33:34 +0100
Subject: [PATCH 2/3] pki-tomcat8 needs tomcat-api.jar to compile

Tomcat 8.0.32 has moved org.apache.tomcat.ContextBind into
tomcat-api.jar. Add tomcat-api.jar to javac classpath to compile pki
with latest Tomcat.

https://fedorahosted.org/pki/attachment/ticket/2222
---
 base/server/tomcat8/src/CMakeLists.txt | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/base/server/tomcat8/src/CMakeLists.txt b/base/server/tomcat8/src/CMakeLists.txt
index df55916bc0bc0e2bb010239115c68b8bc5ad6c84..8aed1fc18e8173b3db841ed2cd3d730b9f45753f 100644
--- a/base/server/tomcat8/src/CMakeLists.txt
+++ b/base/server/tomcat8/src/CMakeLists.txt
@@ -44,6 +44,13 @@ find_file(TOMCAT_CATALINA_JAR
         /usr/share/java/tomcat
 )
 
+find_file(TOMCAT_API_JAR
+    NAMES
+        tomcat-api.jar
+    PATHS
+        /usr/share/java/tomcat
+)
+
 find_file(TOMCAT_UTIL_SCAN_JAR
     NAMES
         tomcat-util-scan.jar
@@ -123,7 +130,7 @@ javac(pki-tomcat8-classes
     SOURCES
         com/netscape/cms/tomcat/*.java
     CLASSPATH
-        ${SERVLET_JAR} ${TOMCAT_CATALINA_JAR} ${TOMCAT_UTIL_SCAN_JAR}
+        ${SERVLET_JAR} ${TOMCAT_CATALINA_JAR} ${TOMCAT_UTIL_SCAN_JAR} ${TOMCAT_API_JAR}
             ${CMAKE_BINARY_DIR}/../../tomcat
     OUTPUT_DIR
         ${CMAKE_BINARY_DIR}/../../tomcat
-- 
2.5.0

From 7d90e12fd05ae58b1d02c2e944c4807d26cd21c5 Mon Sep 17 00:00:00 2001
From: Christian Heimes <cheimes redhat com>
Date: Thu, 25 Feb 2016 12:46:35 +0100
Subject: [PATCH 3/3] Silence pylint 1.5 false positives

Pylint 1.5 complains about additional issues. All issues are false
positives.

https://fedorahosted.org/pki/attachment/ticket/2223
---
 base/common/python/pki/cert.py       | 10 ++++------
 base/common/python/pki/systemcert.py |  1 +
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/base/common/python/pki/cert.py b/base/common/python/pki/cert.py
index c03bf60074581eaaf2b16d2f940b5175623c4fd5..05db87c73c9337a59e88371b468f459f4986ff62 100644
--- a/base/common/python/pki/cert.py
+++ b/base/common/python/pki/cert.py
@@ -603,12 +603,10 @@ class CertReviewResponse(CertEnrollmentRequest):
 
         profile_policy_sets = attr_list['ProfilePolicySet']
         if not isinstance(profile_policy_sets, list):
-            review_response.policy_sets.append(
-                profile.ProfilePolicySet.from_json(profile_policy_sets))
-        else:
-            for policy_set in profile_policy_sets:
-                review_response.policy_sets.append(
-                    profile.ProfilePolicySet.from_json(policy_set))
+            profile_policy_sets = [profile_policy_sets]
+        for policy_set in profile_policy_sets:
+            review_response.policy_sets.append(  # pylint: disable=E1101
+                profile.ProfilePolicySet.from_json(policy_set))
 
         return review_response
 
diff --git a/base/common/python/pki/systemcert.py b/base/common/python/pki/systemcert.py
index a7d4e1c718cf8368b3f832bbec61ef5e78fae080..7e450b9ed10f54ddb6fbc04d126cf44e601f08e3 100644
--- a/base/common/python/pki/systemcert.py
+++ b/base/common/python/pki/systemcert.py
@@ -54,6 +54,7 @@ class SystemCertClient(object):
         cert_data = CertData.from_json(response.json())
 
         pem = cert_data.encoded
+        # pylint: disable=E1136
         b64 = pem[len(pki.CERT_HEADER):len(pem) - len(pki.CERT_FOOTER)]
         cert_data.binary = decode_cert(b64)
 
-- 
2.5.0

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]