<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6096</bug_id>
          
          <creation_ts>2008-09-19 13:38:40 +0000</creation_ts>
          <short_desc>HTTPS certificate: an expired and invalid certificate only triggers a WARN</short_desc>
          <delta_ts>2008-12-04 14:59:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>mobileOK Basic checker</product>
          <component>Java Library</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="fd">fd</reporter>
          <assigned_to name="Abel Rionda">abel.rionda</assigned_to>
          
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21955</commentid>
    <comment_count>0</comment_count>
    <who name="fd">fd</who>
    <bug_when>2008-09-19 13:38:40 +0000</bug_when>
    <thetext>The spec currently says under 2.4.3 HTTP Response:
 If the certificate is invalid, FAIL
 If the certificate has expired, warn


In MobileOKTrustManager.checkServerTrusted, the check for expiration is performed before the check for validity (the name of the method that checks for expiration is slightly confusing since it&apos;s called checkValidity, but that&apos;s another matter ;-)), and the check for validity is not performed if the check for expiration fails.


I suggest:
1. to check whether the certificate is self-signed (I don&apos;t think we need to parse the chain of certificates, do we? The first one should be enough)
2. to check the validity of the certificate if the chain is not self-signed using:
 tm.checkServerTrusted(chain, authType);
3. to check the certificate is valid at the time of the check afterward, using:
 tm.checkValidity();

This would return a FAIL when a certificate is both expired and invalid, and not only the WARN. It would not return both the FAIL and the WARN, but I don&apos;t think we need to go that far.

PS: the changes to come on the way SSL certificates are managed should not affect this behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21956</commentid>
    <comment_count>1</comment_count>
    <who name="fd">fd</who>
    <bug_when>2008-09-19 14:00:06 +0000</bug_when>
    <thetext>Actually, I think I&apos;m slightly wrong for 1. Checking the first certificate is enough to detect a self-signed certificate, but won&apos;t be enough to detect arbitrary root certificates, as required by the soon-validated new rules.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22676</commentid>
    <comment_count>2</comment_count>
    <who name="fd">fd</who>
    <bug_when>2008-12-04 14:59:20 +0000</bug_when>
    <thetext>I implemented the changes, although confirmation that the check on the authentication type would probably be a good thing.

See details in:
http://lists.w3.org/Archives/Public/public-mobileok-checker/2008Dec/0000.html
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>