From aa613fa272defcc8eebd4b9ef2556e61683b4e97 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 9 Feb 2016 18:41:40 +0100 Subject: Refactored PKCS12Export. The code to export NSS database into PKCS #12 file in PKCS12Export tool has been refactored into PKCS12Util class to simplify further enhancements. The PKCS12Export tool has also been modified to use Java Logging API. A default logging configuration file has been added. The command-line wrapper has been modified to get the path to the logging configuration file from pki.conf. https://fedorahosted.org/pki/ticket/1742 --- base/common/CMakeLists.txt | 1 + base/common/share/etc/logging.properties | 28 ++++++++++++++++++++++++++++ base/common/share/etc/pki.conf | 3 +++ 3 files changed, 32 insertions(+) create mode 100644 base/common/share/etc/logging.properties (limited to 'base/common') diff --git a/base/common/CMakeLists.txt b/base/common/CMakeLists.txt index ee401f201..121392512 100644 --- a/base/common/CMakeLists.txt +++ b/base/common/CMakeLists.txt @@ -13,6 +13,7 @@ configure_file( install( FILES + ${CMAKE_CURRENT_SOURCE_DIR}/share/etc/logging.properties ${CMAKE_CURRENT_BINARY_DIR}/share/etc/pki.conf DESTINATION ${DATA_INSTALL_DIR}/etc/ diff --git a/base/common/share/etc/logging.properties b/base/common/share/etc/logging.properties new file mode 100644 index 000000000..bd5b5b627 --- /dev/null +++ b/base/common/share/etc/logging.properties @@ -0,0 +1,28 @@ +# --- BEGIN COPYRIGHT BLOCK --- +# Copyright (C) 2016 Red Hat, Inc. +# All rights reserved. +# Modifications: configuration parameters +# --- END COPYRIGHT BLOCK --- + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +handlers = java.util.logging.ConsoleHandler + +java.util.logging.ConsoleHandler.level = ALL +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter +java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n + +.level = WARNING diff --git a/base/common/share/etc/pki.conf b/base/common/share/etc/pki.conf index a43d1d6c1..57cb83e5a 100644 --- a/base/common/share/etc/pki.conf +++ b/base/common/share/etc/pki.conf @@ -1,2 +1,5 @@ # JNI jar file location JNI_JAR_DIR=/usr/lib/java + +# logging configuration location +LOGGING_CONFIG=/usr/share/pki/etc/logging.properties -- cgit