Fossil SCM

Add the --no-cert-verify option to the test-httpmsg command.

drh 2024-11-04 12:12 httpmsg-debug
Commit 5a6fd8820c7f33e867a3bfbfc0be389ca92d49141c5915e64eb00e37283c9011
1 file changed +4
+4
--- src/http.c
+++ src/http.c
@@ -768,10 +768,11 @@
768768
** a GET request where there is no PAYLOAD.
769769
**
770770
** Options:
771771
** --compress Use ZLIB compression on the payload
772772
** --mimetype TYPE Mimetype of the payload
773
+** --no-cert-verify Disable TLS cert verification
773774
** --out FILE Store the reply in FILE
774775
** -v Verbose output
775776
** --xfer PAYLOAD in a Fossil xfer protocol message
776777
*/
777778
void test_httpmsg_command(void){
@@ -783,10 +784,13 @@
783784
784785
zMimetype = find_option("mimetype",0,1);
785786
zOutFile = find_option("out","o",1);
786787
if( find_option("verbose","v",0)!=0 ) mHttpFlags |= HTTP_VERBOSE;
787788
if( find_option("compress",0,0)!=0 ) mHttpFlags &= ~HTTP_NOCOMPRESS;
789
+ if( find_option("no-cert-verify",0,0)!=0 ){
790
+ ssl_disable_cert_verification();
791
+ }
788792
if( find_option("xfer",0,0)!=0 ){
789793
mHttpFlags |= HTTP_USE_LOGIN;
790794
mHttpFlags &= ~HTTP_GENERIC;
791795
}
792796
verify_all_options();
793797
--- src/http.c
+++ src/http.c
@@ -768,10 +768,11 @@
768 ** a GET request where there is no PAYLOAD.
769 **
770 ** Options:
771 ** --compress Use ZLIB compression on the payload
772 ** --mimetype TYPE Mimetype of the payload
 
773 ** --out FILE Store the reply in FILE
774 ** -v Verbose output
775 ** --xfer PAYLOAD in a Fossil xfer protocol message
776 */
777 void test_httpmsg_command(void){
@@ -783,10 +784,13 @@
783
784 zMimetype = find_option("mimetype",0,1);
785 zOutFile = find_option("out","o",1);
786 if( find_option("verbose","v",0)!=0 ) mHttpFlags |= HTTP_VERBOSE;
787 if( find_option("compress",0,0)!=0 ) mHttpFlags &= ~HTTP_NOCOMPRESS;
 
 
 
788 if( find_option("xfer",0,0)!=0 ){
789 mHttpFlags |= HTTP_USE_LOGIN;
790 mHttpFlags &= ~HTTP_GENERIC;
791 }
792 verify_all_options();
793
--- src/http.c
+++ src/http.c
@@ -768,10 +768,11 @@
768 ** a GET request where there is no PAYLOAD.
769 **
770 ** Options:
771 ** --compress Use ZLIB compression on the payload
772 ** --mimetype TYPE Mimetype of the payload
773 ** --no-cert-verify Disable TLS cert verification
774 ** --out FILE Store the reply in FILE
775 ** -v Verbose output
776 ** --xfer PAYLOAD in a Fossil xfer protocol message
777 */
778 void test_httpmsg_command(void){
@@ -783,10 +784,13 @@
784
785 zMimetype = find_option("mimetype",0,1);
786 zOutFile = find_option("out","o",1);
787 if( find_option("verbose","v",0)!=0 ) mHttpFlags |= HTTP_VERBOSE;
788 if( find_option("compress",0,0)!=0 ) mHttpFlags &= ~HTTP_NOCOMPRESS;
789 if( find_option("no-cert-verify",0,0)!=0 ){
790 ssl_disable_cert_verification();
791 }
792 if( find_option("xfer",0,0)!=0 ){
793 mHttpFlags |= HTTP_USE_LOGIN;
794 mHttpFlags &= ~HTTP_GENERIC;
795 }
796 verify_all_options();
797

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button