Difference between revisions of "Debugging NSS"

From Dogtag
Jump to: navigation, search
m (References)
m (Replaced content with "This page has been moved to https://github.com/dogtagpki/nss/wiki/Debugging-NSS.")
 
Line 1: Line 1:
= Installing NSS Debug Packages =
+
This page has been moved to https://github.com/dogtagpki/nss/wiki/Debugging-NSS.
 
 
<pre>
 
$ yum install yum-utils
 
$ debuginfo-install nss
 
</pre>
 
 
 
= Enabling NSS Debug Logs =
 
 
 
The NSS security libraries provide the crypto foundation around which all of the Dogtag services are derived.
 
This section gives example on how to debug NSS (PKCS11) in the Dogtag server.
 
 
 
Find the name of the PKCS #11 module:
 
 
 
$ modutil -list -nocertdb -dbdir <font color="red">/var/lib/pki/pki-tomcat/alias</font>
 
 
 
To debug the client, specify the following environment variables:
 
 
 
$ export NSPR_LOG_MODULES="all:5"
 
$ export NSPR_LOG_FILE="<font color="red">/tmp/pkcs11.log</font>"
 
$ export NSS_DEBUG_PKCS11_MODULE="<font color="red">NSS Internal PKCS #11 Module</font>"
 
 
 
To debug the server, specify the environment variables in /etc/sysconfig/<font color="red">pki-tomcat</font>:
 
 
 
NSPR_LOG_MODULES="all:5"
 
NSPR_LOG_FILE="<font color="red">/tmp/pki-tomcat.log</font>"
 
NSS_DEBUG_PKCS11_MODULE="<font color="red">NSS Internal PKCS #11 Module</font>"
 
 
 
Then start/restart the server:
 
 
 
$ systemctl start pki-tomcatd@<font color="red">pki-tomcat</font>.service
 
 
 
The log messages will be written into the specified log file.
 
 
 
= References =
 
 
 
* [[NSS]]
 
* [[Debugging]]
 
* [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES NSPR_LOG_MODULES]
 
* [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_FILE NSPR_LOG_FILE]
 

Latest revision as of 01:58, 23 July 2022

This page has been moved to https://github.com/dogtagpki/nss/wiki/Debugging-NSS.