Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#38 SSL pinning draft implemetation #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vvsevolodovich
Copy link

Let's review the general approach and discuss the details after.

@TakahikoKawasaki
Copy link
Owner

Thank you. I'll start reading your code.

BTW, however, if the license of your source files is GPL, nv-websocket-client cannot accept them.

@vvsevolodovich
Copy link
Author

Well, I see the issue. What about I will rewrite the files in order not to be limited with GPL?

@twogood
Copy link

twogood commented Feb 29, 2016

Code is copied from https://github.com/moxie0/AndroidPinning - it can't just be "rewritten".

@vvsevolodovich
Copy link
Author

I know that, but nobody can restrict me from creating my own code using ideas from that library?

@TakahikoKawasaki
Copy link
Owner

I'm sorry for having not responded so long because I'm recently really busy...

I think that RFC 7469 (Public Key Pinning Extension for HTTP) should be read to judge whether an implementation is a natural result from the specification or a copy from another implementation. I should read the specification...

@matt-thinair
Copy link

Any update here? We're using this (very elegant!) websockets library and need cert pinning

@TakahikoKawasaki
Copy link
Owner

@matt-thinair Sorry, no update. Thank you for reminding me of this.

@bri3d
Copy link

bri3d commented Oct 31, 2016

In the wild, "certificate pinning" generally refers simply to "verifying that server's certificate and/or public key signature match a fixed set of certs or public key signatures encoded into the application."

Neither the code in this PR nor most client developers implement RFC 7469 - that's a separate specification which documents a mechanism for HTTP servers to specify that a client should "remember" Subject Public Key Info via HTTP header.

@matt-thinair You can implement the typical case of "cert pinning" using the existing implementation of the library, without needing additional modifications to the library code. Use setSSLContext on the Factory to pass in a Context you've set up using your own custom TrustManager , using the method documented in https://developer.android.com/training/articles/security-ssl.html#UnknownCa to add only your own certificates to the TrustManager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants