Python Requests – SSL error for client side cert

I had this same problem. The verify parameter refers to the server’s certificate. You want the cert parameter to specify your client certificate. import requests cert_file_path = “cert.pem” key_file_path = “key.pem” url = “https://example.com/resource” params = {“param_1”: “value_1”, “param_2”: “value_2”} cert = (cert_file_path, key_file_path) r = requests.get(url, params=params, cert=cert)

Xcode – iPhone – profile doesn’t match any valid certificate-/private-key pair in the default keychain

To generate a certificate on the Apple provisioning profile website, firstly you have to generate keys on your mac, then upload the public key. Apple will generate your certificates with this key. When you download your certificates, tu be able to use them you need to have the private key. The error “XCode could not … Read more

Creating a .p12 file

The openssl documentation says that file supplied as the -in argument must be in PEM format. Turns out that, contrary to the CA’s manual, the certificate returned by the CA which I stored in myCert.cer is not PEM format rather it is PKCS7. In order to create my .p12, I had to first convert the … Read more

How to disable “Security Alert” window in Webbrowser control

This should do it: public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; } ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate); Obviously, blindingly allowing certificates is a security risk. Be careful.

Https iOS with self signed certificate

By default, Cocoa refuses all SSL connections when the certificate is invalid. However, you can force them to accept also invalid certificates. The method depends on which library/framework you are using. For example: For NSURLConnection, check this answer. For ASIHTTPRequest, you need to set the property validatesSecureCertificate to NO. For AFNetworking, you can check the … Read more