Hallo zusammen,
ich muss per CURL innerhalb eines Bash Skriptes eine API ansteuern. Aber ich bekomme immer die Fehlermeldung:
Curl: (60) SSL certificate problem: unable to get local issuer certificate
Im Browser funktioniert die Webseite, allerdings nicht per Curl.
Wenn ich die Webseite mit openssl checke, dann sieht das so aus:
user@notebook:~$ echo "QUIT" | openssl s_client -connect SERVER.de:443 -CApath /etc/ssl/certs CONNECTED(00000003) depth=0 OU = Domain Control Validated, CN = *.SERVER.de verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 OU = Domain Control Validated, CN = *.SERVER.de verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/OU=Domain Control Validated/CN=*.SERVER.de i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA --- Server certificate -----BEGIN CERTIFICATE----- (...) -----END CERTIFICATE----- subject=/OU=Domain Control Validated/CN=*.SERVER.de issuer=/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA --- No client certificate CA names sent Peer signing digest: SHA512 Server Temp Key: ECDH, P-256, 256 bits --- SSL handshake has read 2418 bytes and written 302 bytes Verification error: unable to verify the first certificate --- New, TLSv1.2, Cipher is EC123-RSA-AES128-GCM-SHA256 Server public key is 2048 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : EC123-RSA-AES128-GCM-SHA256 Session-ID: 969321 Session-ID-ctx: Master-Key: FB0DA888F2B34568753534FF828CBB96CCC6C246352696F13E3DBD1D1CBB7692389E3B1C2B8DD5F3A3EB759A1D730F6 PSK identity: None PSK identity hint: None SRP username: None TLS session ticket lifetime hint: 300 (seconds) TLS session ticket: 0000 - 95 f5 93 10 f2 8b 44 6a-d7 7f e5 be be db 96 51 ......Dj.......Q 0010 - 71 3f 17 dd ad 08 ea c0-53 90 1b 15 0c be 26 49 q.......S.....&I 0020 - ec 91 39 f3 07 1f 97 a4-97 8d 27 e7 9e fb 9f 81 ..9.......'..... 0030 - f6 6a 89 5a 67 82 e4 05-83 3f 25 ef ed 00 46 5d .j..g....?%...F] 0040 - df ad 42 2d fb e8 b7 89-c8 0b 22 88 84 40 f9 c7 ..B-......"..@.. 0050 - e9 60 b0 71 2c 06 bb f7-de e2 39 46 84 73 1b 7f .`.q,.....9F.s.. 0060 - 63 8f cf 27 8d 2f c1 62-77 3d f6 2d 5e 81 13 5d c..'./.bw=.-^..] 0070 - 0f 30 c0 87 63 a1 a8 cc-c5 6a 55 cd b7 2f a1 db .0..c....jU../.. 0080 - 37 f3 9d c9 79 cb 2b 46-c9 bf f1 ee 0a 4e d3 cd 7.....+F.....N.. 0090 - 71 4d f8 50 fb e9 de 87-cb 73 98 64 49 b2 ae 15 qM.P.....s.dI... 00a0 - bb 6d f7 21 e4 69 a1 4a-83 14 c4 70 f7 bc df 5b .m.!.i.J...p...[ Start Time: 1574523120 Timeout : 7200 (sec) Verify return code: 21 (unable to verify the first certificate) Extended master secret: no --- DONE
Wie kriege ich den curl Aufruf hin? Laut Support des betreffenden Webdienstes klappt deren Aufruf per curl. Leider habe ich keinen Admin Zugang zum Server.
Dank und Gruß duffy6