Requests is not Working on Enigma2

Hello everybody,

I am trying to use requests on Enigma2 STB (using OpenPLi 3.0), but i am getting the following error:

``` python
# python2.7
Python 2.7.2 (default, Dec 14 2012, 09:28:54) 
[GCC 4.6.4 20120303 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests 
>>> requests.__version__
'1.1.0'
>>> requests.certs.where()
'requests/cacert.pem'
>>> requests.get('https://www.google.com')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "requests/sessions.py", line 289, in request
    resp = self.send(prep, **send_kwargs)
  File "requests/sessions.py", line 385, in send
    r = adapter.send(request, **kwargs)
  File "requests/adapters.py", line 227, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
>>> requests.get('https://www.google.com', verify=False)
<Response [200]>
```

Any idea why verify is not working?

The above steps on my computer working without a problem.

``` python
# python2.7
Python 2.7.3 (default, Aug  1 2012, 05:16:07) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.__version__
'1.1.0'
>>> requests.certs.where()
'requests/cacert.pem'
>>> requests.get('https://www.google.com')
<Response [200]>
```

Thanks.


Could you try the commandline version of OpenSSL?

``` sh
$ openssl s_client -connect google.com:443  -CAfile requests/cacert.pem
# [..] Some output
Start Time: 1360430734
Timeout   : 300 (sec)
Verify return code: 0 (ok)
```


```
# openssl s_client -connect google.com:443  -CAfile requests/cacert.pem
CONNECTED(00000003)
depth=2 /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
verify error:num=9:certificate is not yet valid
notBefore=Aug 22 16:41:51 1998 GMT
verify return:0
---
Certificate chain
 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
   i:/C=US/O=Google Inc/CN=Google Internet Authority
 1 s:/C=US/O=Google Inc/CN=Google Internet Authority
   i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIF/DCCBWWgAwIBAgIKGIvRAgAAAAB3jzANBgkqhkiG9w0BAQUFADBGMQswCQYD
VQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzEiMCAGA1UEAxMZR29vZ2xlIElu
dGVybmV0IEF1dGhvcml0eTAeFw0xMzAxMDMxMjEzMzFaFw0xMzA2MDcxOTQzMjda
MGYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1N
b3VudGFpbiBWaWV3MRMwEQYDVQQKEwpHb29nbGUgSW5jMRUwEwYDVQQDFAwqLmdv
b2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKdLhbKA5ZQDb8pK
5WypcYChZ/e5Rugmtem9WU973RpQaMc633MVzqhpANQnCanN4dFuLcaj6TvWqpRj
gxpkJ7/+h5DU5rjkiah2IxUT4CdrOAr6H7HscQrsNP8NnByn1kcP7HBsKmuJkPXe
WOlOrk1v8PHKfXLAenmUKP6FAVjJAgMBAAGjggPPMIIDyzAdBgNVHSUEFjAUBggr
BgEFBQcDAQYIKwYBBQUHAwIwHQYDVR0OBBYEFJ5FvWMPpHBCSLtVaEiEPHcH2+iU
MB8GA1UdIwQYMBaAFL/AMOv1QxE+Z7qekfv8atrjaxIkMFsGA1UdHwRUMFIwUKBO
oEyGSmh0dHA6Ly93d3cuZ3N0YXRpYy5jb20vR29vZ2xlSW50ZXJuZXRBdXRob3Jp
dHkvR29vZ2xlSW50ZXJuZXRBdXRob3JpdHkuY3JsMGYGCCsGAQUFBwEBBFowWDBW
BggrBgEFBQcwAoZKaHR0cDovL3d3dy5nc3RhdGljLmNvbS9Hb29nbGVJbnRlcm5l
dEF1dGhvcml0eS9Hb29nbGVJbnRlcm5ldEF1dGhvcml0eS5jcnQwDAYD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dX6qai9sOfB/p4HnQrcgWXaDf6
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
issuer=/C=US/O=Google Inc/CN=Google Internet Authority
---
No client certificate CA names sent
---
SSL handshake has read 2388 bytes and written 307 bytes
---
New, TLSv1/SSLv3, Cipher is RC4-SHA
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : RC4-SHA
    Session-ID: DA49B5C8BF8EF63435AA01F7F9610579BF9AD7F5E805C787C00A2CDB34796F2B
    Session-ID-ctx:
    Master-Key: 67EE0744C5F462632AB404B0BE3ECE7668158D83085BA4AA8A0654D3CD92A5270E75D32929A158D2402ABD24C4CB6FEF
    Key-Arg   : None
    Start Time: 26420
    Timeout   : 300 (sec)
    Verify return code: 9 (certificate is not yet valid)
---
```

**Verify return code: 9 (certificate is not yet valid)**

Thanks @t-8ch!  

The time was wrong, after setting up ntp everything works.


Thanks @t-8ch for helping @athoik clear this up.