blob: 41b2d8d2a2e80899723f4ed11e00dd7b8abd0cd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh +x
cert=`cat example.b64`
url="https://dev.example.com/ipa/json"
#url="http://localhost:8888/ipa/json"
json="{
\"method\": \"service_add\",
\"params\": [
[ \"test/dev.example.com@DEV.EXAMPLE.COM\" ],
{ \"usercertificate\": { \"__base64__\": \"$cert\" } }
],
\"id\":0
}"\
curl\
-H "Content-Type:application/json"\
-H "Accept:applicaton/json"\
--negotiate -u :\
--cacert /etc/ipa/ca.crt\
-d "$json"\
-X POST\
$url
|