Fwd: client using ssl

Josef Frydl <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Even this call fails
?-  open('/Users/joseffrydl/Desktop/proKatu/p.txt', write, S),
|        Search= 'https://ajax.googleapis.com/ajax/services/search/web?v=1.0&rsz=large&q=Josef Frydl Westminster&start=0',
|        http_open(Search, In,
|                        [cert_verify_hook(cert_verify),status_code(Code),
|    cacert_file('/Users/joseffrydl/Desktop/proKatu/needed/cacert.pem'),
|    certificate_file('/Users/joseffrydl/Desktop/proKatu/needed/client-cert.pem'),
|    key_file('/Users/joseffrydl/Desktop/proKatu/needed/client-key.pem')
|                       ]),copy_stream_data(In, S),close(In),close(S).
Debug: SSL error report:
	    code: 14090086
	 library: SSL routines
	function: SSL3_GET_SERVER_CERTIFICATE
	  reason: certificate verify failed
Unrecoverable error: 5
Additionally, get_error returned 0


Begin forwarded message:

> From: Josef Frydl <[email protected]>
> Date: January 16, 2014 2:15:12 PM EST
> To: [email protected]
> Subject: client using ssl
> 
> I have stable version:
> elcome to SWI-Prolog (Multi-threaded, 32 bits, Version 6.6.1)
> Copyright (c) 1990-2013 University of Amsterdam, VU Amsterdam
> SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
> and you are welcome to redistribute it under certain conditions.
> Please visit http://www.swi-prolog.org for details.
> Pasted this
> cert_verify(_SSL, _ProblemCert, _AllCerts, _FirstCert, _Error) :-
>        format(user_error, 'Accepting certificate~n', []).
> 
> But still can not use ssl
> 
> ?- open('/Users/joseffrydl/Desktop/proKatu/p.txt', write, S),
> |    Search= 'https://ajax.googleapis.com/ajax/services/search/web?v=1.0&rsz=large&q=Josef Frydl Westminster&start=0',
> |    http_open(Search, In, [cert_verify_hook(cert_verify),status_code(Code)]),
> |    copy_stream_data(In, S),close(In),close(S).
> Debug: SSL error report:
> 	    code: 14090086
> 	 library: SSL routines
> 	function: SSL3_GET_SERVER_CERTIFICATE
> 	  reason: certificate verify failed
> Unrecoverable error: 5
> Additionally, get_error returned 0
> URL works nucely from browser.
> Are there some other steps I have to do?
> 
> in addition does anybody knows searcg engine, that can be used in http_open calls
> 
> Thanks Josef Frydl
> 
> 

-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.