A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
3
Task/HTTPS-Client-authenticated/0DESCRIPTION
Normal file
3
Task/HTTPS-Client-authenticated/0DESCRIPTION
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Demonstrate how to connect to a web server over HTTPS where that server requires that the client present a certificate to prove who (s)he is. Unlike with the [[HTTPS request with authentication]] task, it is ''not'' acceptable to perform the authentication by a username/password or a set cookie.
|
||||
|
||||
This task is in general useful for use with [[Creating a SOAP Client|webservice client]]s as it offers a high level of assurance that the client is an acceptable counterparty for the server. For example, [http://aws.amazon.com/ Amazon Web Services] uses this style of authentication.
|
||||
4
Task/HTTPS-Client-authenticated/1META.yaml
Normal file
4
Task/HTTPS-Client-authenticated/1META.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
category:
|
||||
- Networking and Web Interaction
|
||||
note: Programming environment operations
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
a = RunThrough["curl -E myCert.pem https://www.example.com", 1]
|
||||
For[ i=0, i < Length[a] , i++, SomeFunction[a]]
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(in '(curl "-E" "myCert.pem" "https://www.example.com")
|
||||
(while (line)
|
||||
(doSomeProcessingWithLine @) ) )
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package require http
|
||||
package require tls
|
||||
|
||||
set cert myCert.p12
|
||||
http::register https 443 [list \
|
||||
::tls::socket -certfile $cert -password getPass]
|
||||
proc getPass {} {
|
||||
return "myPassword"; # Just a noddy example...
|
||||
}
|
||||
|
||||
# Make a secure authenticated connection
|
||||
set token [http::geturl https://verysecure.example.com/]
|
||||
|
||||
# Now as for conventional use of the “http” package
|
||||
set data [http::data $token]
|
||||
http::cleanup $token
|
||||
Loading…
Add table
Add a link
Reference in a new issue