Fossil

Check-in [daa6a0eb]
Login

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

Overview
Comment:Adding some ipv4-only code to get the ip where we took the content from for the https connections. The "rcvfrom" information was lost in the case of https connections.

I don't know how to make it work well for ipv6 too.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ssl_peer_ip
Files: files | file ages | folders
SHA1: daa6a0eb9b03c4f091f541ee7162d46461e69157
User & Date: viriketo 2011-09-01 20:33:46
Context
2011-09-01
20:38
I think I fix a possible bug on platforms where 'char' has signed meaning, on the code about noting the 'rcvfrom' ipv4 address. Closed-Leaf check-in: 9ce6771c user: viriketo tags: ssl_peer_ip
20:33
Adding some ipv4-only code to get the ip where we took the content from for the https connections. The "rcvfrom" information was lost in the case of https connections.

I don't know how to make it work well for ipv6 too. check-in: daa6a0eb user: viriketo tags: ssl_peer_ip

17:45
Merging the unwanted two trunk leaves. check-in: a22c3817 user: viriketo tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/http_ssl.c.

278
279
280
281
282
283
284











285
286
287
288
289
290
291
      return 1;
    }
    if( blob_str(&ans)[0]=='a' ) {
      ssl_save_certificate(cert);
    }
    blob_reset(&ans);
  }











  X509_free(cert);
  return 0;
}

/*
** Save certificate to global config.
*/







>
>
>
>
>
>
>
>
>
>
>







278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
      return 1;
    }
    if( blob_str(&ans)[0]=='a' ) {
      ssl_save_certificate(cert);
    }
    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.
  */
  {
      /* IPv4 only code */
      const char *ip = BIO_get_conn_ip(iBio);
      g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
  }

  X509_free(cert);
  return 0;
}

/*
** Save certificate to global config.
*/