2016-05-25 22 views
0

platform.lifelog.sonymobile.com:443に到達しようとしているときに、Python(requestsライブラリ)またはopensslのいずれかでSSLハンドシェイクエラーが発生しました。ここでSONY Lifelog Api:SSLハンドシェイクエラー

私はopensslの

SSL3から取得出力されます。

$ >openssl s_client -connect platform.lifelog.sonymobile.com:443 -ssl3 -state 
CONNECTED(00000003) 
SSL_connect:before/connect initialization 
SSL_connect:SSLv3 write client hello A 
SSL3 alert read:fatal:handshake failure 
SSL_connect:failed in SSLv3 read server hello A 
3073824444:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1262:SSL alert number 40 
3073824444:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:598: 
--- 
no peer certificate available 
--- 
No client certificate CA names sent 
--- 
SSL handshake has read 7 bytes and written 0 bytes 
--- 
New, (NONE), Cipher is (NONE) 
Secure Renegotiation IS NOT supported 
Compression: NONE 
Expansion: NONE 
SSL-Session: 
    Protocol : SSLv3 
    Cipher : 0000 
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Key-Arg : None 
    PSK identity: None 
    PSK identity hint: None 
    SRP username: None 
    Start Time: 1464110874 
    Timeout : 7200 (sec) 
    Verify return code: 0 (ok) 
--- 

tlsv1.1

$>openssl s_client -connect platform.lifelog.sonymobile.com:443 -tls1_1 
CONNECTED(00000003) 
3074041532:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1262:SSL alert number 40 
3074041532:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:598: 
--- 
no peer certificate available 
--- 
No client certificate CA names sent 
--- 
SSL handshake has read 7 bytes and written 0 bytes 
--- 
New, (NONE), Cipher is (NONE) 
Secure Renegotiation IS NOT supported 
Compression: NONE 
Expansion: NONE 
SSL-Session: 
    Protocol : TLSv1.1 
    Cipher : 0000 
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Key-Arg : None 
    PSK identity: None 
    PSK identity hint: None 
    SRP username: None 
    Start Time: 1464110950 
    Timeout : 7200 (sec) 
    Verify return code: 0 (ok) 
--- 

tlsv1.2

$>openssl s_client -connect platform.lifelog.sonymobile.com:443 -tls1_2 
CONNECTED(00000003) 
3074123452:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1262:SSL alert number 40 
3074123452:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:598: 
--- 
no peer certificate available 
--- 
No client certificate CA names sent 
--- 
SSL handshake has read 7 bytes and written 0 bytes 
--- 
New, (NONE), Cipher is (NONE) 
Secure Renegotiation IS NOT supported 
Compression: NONE 
Expansion: NONE 
SSL-Session: 
    Protocol : TLSv1.2 
    Cipher : 0000 
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Key-Arg : None 
    PSK identity: None 
    PSK identity hint: None 
    SRP username: None 
    Start Time: 1464110938 
    Timeout : 7200 (sec) 
    Verify return code: 0 (ok) 
--- 

クライアント証明書などが必要ですか? ありがとう!

+0

申し訳ありませんが、私はopensslをそれほど使用していませんが、データの取得を開始するには標準誓約2.0プロセスを実行する必要があります。たとえば、この呼び出しで始まる:https://platform.lifelog.sonymobile.com/oauth/2/authorize?client_id=YOUR_CLIENT_ID&scope=lifelog.profile.read+lifelog.activities.read+lifelog.locations.read。私は秘密と秘密のクライアントに登録しましたか?プロセスの詳細については、https://developer.sony.com/develop/services/lifelog-api/authentication/ –

答えて

0

私はからhttps://github.com/google/google-oauth-java-clientを使用して、lifelog APIから定期的にデータを取得しています。証明書に特別な注意は必要ありませんでした。 Androidクライアントの前では、ARC(Chromeのレストクライアント)ですべてのロジックをテストしました。curlでいくつかのテストを行いましたが、このようなベアラを取得しました(Lifelog APIドキュメントに従って認証値を取得する必要があります)。

curl 'https://platform.lifelog.sonymobile.com/v1/users/me/activities' \ 
    -H 'Pragma: no-cache' -H 'Accept-Encoding: gzip, deflate, sdch' \ 
    -H 'Accept-Language: es-419,es;q=0.8,en-US;q=0.6,en;q=0.4' \ 
    -H 'Authorization: Bearer AuyKFAzQar5xhgRHhHKlboApaRKH' \ 
    -H 'Accept: */*' -H 'Cache-Control: no-cache' \ 
    -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36' \ 
    -H 'Cookie: BLABLA' -H 'Connection: keep-alive' --compressed 
+0

をご覧ください。実際には、セキュリティパッケージ( 'pip install requests [seccurity]')を追加して 'requests'をインストールすることで、私はこれを解決しました。そうすることで、魅力的に機能しました(証明書の問題をよりうまく処理する)。 –

関連する問題