Skip to main content
Improve formatting
Source Link
arif
  • 1.6k
  • 6
  • 18
  • 28

curl: (60) Peer's Certificate issuer is not recognized. More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

curl: (60) Peer's Certificate issuer is not recognized. More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. 

HTTP/1.1 302 Moved Temporarily Date: Thu, 07 Dec 2017 04:53:44 GMT Transfer-Encoding: chunked Location: https://xxx.xxx.xxx.xxx/login X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: JSESSIONID=xxxxxxxxxxx; path=/; HttpOnly

HTTP/1.1 302 Moved Temporarily Date: Thu, 07 Dec 2017 04:53:44 GMT Transfer-Encoding: chunked Location: https://xxx.xxx.xxx.xxx/login X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: JSESSIONID=xxxxxxxxxxx; path=/; HttpOnly 

`HTTP/1.1 301 Moved Permanently Location: https://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Thu, 07 Dec 2017 05:13:44 GMT Expires: Sat, 06 Jan 2018 05:13:44 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 220 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"

HTTP/1.1 301 Moved Permanently Location: https://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Thu, 07 Dec 2017 05:13:44 GMT Expires: Sat, 06 Jan 2018 05:13:44 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 220 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35" <HTML><HEAD><meta http-equiv="content-..... 

`..........................

405. That’s an error.

The request method DELETE is inappropriate for the URL /. That’s all we know.`

.......................... <p><b>405.</b> <ins>That’s an error.</ins> <p>The request method <code>DELETE</code> is inappropriate for the URL <code>/</code>. <ins>That’s all we know.</ins>` 

curl: (60) Peer's Certificate issuer is not recognized. More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

HTTP/1.1 302 Moved Temporarily Date: Thu, 07 Dec 2017 04:53:44 GMT Transfer-Encoding: chunked Location: https://xxx.xxx.xxx.xxx/login X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: JSESSIONID=xxxxxxxxxxx; path=/; HttpOnly

`HTTP/1.1 301 Moved Permanently Location: https://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Thu, 07 Dec 2017 05:13:44 GMT Expires: Sat, 06 Jan 2018 05:13:44 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 220 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"

`..........................

405. That’s an error.

The request method DELETE is inappropriate for the URL /. That’s all we know.`

curl: (60) Peer's Certificate issuer is not recognized. More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. 
HTTP/1.1 302 Moved Temporarily Date: Thu, 07 Dec 2017 04:53:44 GMT Transfer-Encoding: chunked Location: https://xxx.xxx.xxx.xxx/login X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: JSESSIONID=xxxxxxxxxxx; path=/; HttpOnly 
HTTP/1.1 301 Moved Permanently Location: https://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Thu, 07 Dec 2017 05:13:44 GMT Expires: Sat, 06 Jan 2018 05:13:44 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 220 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35" <HTML><HEAD><meta http-equiv="content-..... 

.......................... <p><b>405.</b> <ins>That’s an error.</ins> <p>The request method <code>DELETE</code> is inappropriate for the URL <code>/</code>. <ins>That’s all we know.</ins>` 
Source Link
arif
  • 1.6k
  • 6
  • 18
  • 28

-k, --insecure: If you are doing curl to a website which is using a self-signed SSL certificate then curl will give you an error as curl couldn't verify the certificate. In that case, you could use -k or --insecure flag to skip certificate validation.

Example:

[root@arif]$ curl --head https://xxx.xxx.xxx.xxx/login

curl: (60) Peer's Certificate issuer is not recognized. More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

[root@arif]$ curl -k --head https://xxx.xxx.xxx.xxx/login

HTTP/1.1 302 Moved Temporarily Date: Thu, 07 Dec 2017 04:53:44 GMT Transfer-Encoding: chunked Location: https://xxx.xxx.xxx.xxx/login X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: JSESSIONID=xxxxxxxxxxx; path=/; HttpOnly


-i, --include: This flag will include http header. Usually http header are consist of server name, date, content type etc.

Example:

[root@arif]$ curl https://google.com

`

301 Moved

301 Moved

The document has moved here. `

[root@arif]$ curl -i https://google.com

`HTTP/1.1 301 Moved Permanently Location: https://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Thu, 07 Dec 2017 05:13:44 GMT Expires: Sat, 06 Jan 2018 05:13:44 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 220 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"

-X, --request: This flag will used to send custom request to the server. Most of the time we do GET, HEAD, and POST. But if you need specific request like PUT, FTP, DELETE then you can use this flag. Following example will send a delete request to the google.com

Example:

[root@arif]$ curl -X DELETE google.com

`..........................

405. That’s an error.

The request method DELETE is inappropriate for the URL /. That’s all we know.`