3

I have problem with calling wget command in CentOS 6.5. Im using following command:

(I spaced the https, because of my user level on thi forum)

wget --certificate=/root/o2key.pem https://smsconnector.cz.o2.com/smsconnector/getpost/GP?action=send&baID=1992946&toNumber=%2b420733181177&text=Test&msgID=1&deliveryReport=TRUE&intruder=FALSE&multipart=FALSE&validityPeriod=10000&priority=1

System returns this error:

https://smsconnector.cz.o2.com/smsconnector/getpost/GP?action=send Resolving smsconnector.cz.o2.com... 160.218.160.234 Connecting to smsconnector.cz.o2.com|160.218.160.234|:443... connected. HTTP request sent, awaiting response... 400 Bad Request 2014-02-24 11:17:24 ERROR 400: Bad Request.

[1]   Exit 8                  wget --certificate=o2key.pem https://smsconnector.cz.o2.com/smsconnector/getpost/GP?action=send
[2]   Done                    baID=1992946
[3]   Done                    toNumber=420733181177
[4]   Done                    text=Test
[5]   Done                    msgID=1
[6]   Done                    deliveryReport=TRUE
[7]   Done                    intruder=FALSE
[8]-  Done                    multipart=FALSE
[9]+  Done                    validityPeriod=10000

When I try the same url in windows, it works without any problem.

Thx for any advice

2 Answers 2

5

You need to quote. Ampersand is a special character, and many other things valid in URLs are too. Always quote URLs.

3
0

I figured it out:

openssl pkcs12 -in yourdirectory/givencert.p12 -out yourdirectory/xyz.pem -nodes

While opening, cert will ask you for passphare, which should you also recieve from cert publisher. After this, the .pem file is ready to use without any error.

curl --cert yourdirectory/xyz.pem "https://lalala.com"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .