blob: e9621bebe249fc65b5f5523a639b37d0de29dbe5 (
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_mod\",
\"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
|