Fossil

Check-in [636804745b]
Login

Check-in [636804745b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Adjust SSL trust fix to skip prompting for certificates that already have an explicitly negative trust setting.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 636804745b08edeca6196106729ce66fee1368e8
User & Date: mistachkin 2011-10-10 12:59:23.702
Context
2011-10-10
13:05
Additional formatting fixes: shorten lines to 80 characters or less. ... (check-in: c1d78e0556 user: drh tags: trunk)
12:59
Adjust SSL trust fix to skip prompting for certificates that already have an explicitly negative trust setting. ... (check-in: 636804745b user: mistachkin tags: trunk)
12:55
Fix indentation and formatting in http_ssl.c. Limit line length to 80 characters per the coding style spec. ... (check-in: 5eb8f0157a user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/http_ssl.c.
285
286
287
288
289
290
291

292
293
294
295
296
297


298
299
300
301
302
303
304
    if( blob_str(&ans)[0]!='y' && blob_str(&ans)[0]!='a' ) {
      X509_free(cert);
      ssl_set_errmsg("SSL certificate declined");
      ssl_close();
      return 1;
    }
    if( blob_str(&ans)[0]=='a' ) {

      Blob ans2;
      prompt_user("\nSave this certificate as fully trusted [a=always/N]? ",
                  &ans2);
      trusted = (blob_str(&ans2)[0]=='a');
      ssl_save_certificate(cert, trusted);
      blob_reset(&ans2);


    }
    blob_reset(&ans);
  }

  /* Set the Global.zIpAddr variable to the server we are talking to.
  ** This is used to populate the ipaddr column of the rcvfrom table,
  ** if any files are received from the server.







>
|
|
|
|
<
|
>
>







285
286
287
288
289
290
291
292
293
294
295
296

297
298
299
300
301
302
303
304
305
306
    if( blob_str(&ans)[0]!='y' && blob_str(&ans)[0]!='a' ) {
      X509_free(cert);
      ssl_set_errmsg("SSL certificate declined");
      ssl_close();
      return 1;
    }
    if( blob_str(&ans)[0]=='a' ) {
      if ( trusted==0 ){
        Blob ans2;
        prompt_user("\nSave this certificate as fully trusted [a=always/N]? ",
                    &ans2);
        trusted = (blob_str(&ans2)[0]=='a');

        blob_reset(&ans2);
      }
      ssl_save_certificate(cert, trusted);
    }
    blob_reset(&ans);
  }

  /* Set the Global.zIpAddr variable to the server we are talking to.
  ** This is used to populate the ipaddr column of the rcvfrom table,
  ** if any files are received from the server.