<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>31803</bug_id>
          
          <creation_ts>2016-02-15 17:32:29 +0300</creation_ts>
          <short_desc>Add tstclnt and vfyserv</short_desc>
          <delta_ts>2016-03-22 15:43:58 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>nss-utils</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.mail-archive.com/dev-tech-crypto@lists.mozilla.org/msg12466.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>relnote</keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</reporter>
          <assigned_to name="Alexey Gladkov">legion</assigned_to>
          <cc>legion</cc>
    
    <cc>rauty</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>155021</commentid>
    <comment_count>0</comment_count>
    <who name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</who>
    <bug_when>2016-02-15 17:32:29 +0300</bug_when>
    <thetext>----

&gt; OpenSSL has a s_client command that allows you to pull the certificates a
&gt; web page sends and verify the chain of trust against whatever root CA store  &gt; OpenSSL is using. Is there a way to do something similar for NSS? i.e. pull  &gt; the certificates a web page sends and validate them against the current set   &gt; of Mozilla root certificates?                        &gt;                                                            
...

If you use a Linux distribution, you can probably get a package that already
contains the tools. On fedora it&apos;s nss-tools

We have test utilities, that are primarily used as part of the NSS test suite,
and which (at least on Fedora) are shipped in a separate &quot;unsupported-tools&quot;
directory, but they can do what you want.

On Fedora, you can execute
  /usr/lib64/nss/unsupported-tools/vfyserv www.yourhost

which will attempt to validate the server&apos;s cert against the CA trust list that
comes with NSS (from the libnssckbi.so module).

This doesn&apos;t show the full chain on the terminal, but there&apos;s an option -c that
will dump all certs sent by the server into files.

I also like tstclnt, which has recently been enhanced to print information about
the server chain:

/usr/lib64/nss/unsupported-tools/tstclnt -C -D -b -h www.yourhost -p 443

You can use -C up to three times, to get more details about the certs.

---

Real life example of vfyserv output:

$ /usr/lib64/nss/unsupported-tools/vfyserv www.fusemail.com
Connecting to host www.fusemail.com (addr 107.170.212.214) on port 443
Handshake Complete: SERVER CONFIGURED CORRECTLY
bulk cipher AES-256, 256 secret key bits, 256 key bits, status: 1
subject DN:
CN=*.fusemail.com,OU=Domain Control Validated
issuer  DN:
CN=Go Daddy Secure Certificate Authority - G2,OU=http://certs.godaddy.com/repository/,O=&quot;GoDaddy.com, Inc.&quot;,L=Scottsdale,ST=Arizona,C=US
0 cache hits; 0 cache misses, 0 cache not reusable
***** Connection 1 read 392 bytes total.

The output itself is much easy to parse than openssl and that could be handy in monitoring purposes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>155821</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2016-03-22 15:43:58 +0300</bug_when>
    <thetext>nss-3.23.0-alt1 -&gt; sisyphus:

* Mon Mar 21 2016 Alexey Gladkov &lt;legion@altlinux&gt; 3.23.0-alt1
- New version (3.23).
- Add tstclnt and vfyserv (ALT#31803)
- Disable SSL2.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>