pinning

How can I do public key pinning in Flutter?

有些话、适合烂在心里 提交于 2019-11-30 09:08:17
问题 I want to the pin the public key of my server so that any request made to the server has to have that public key (this is to prevent proxies like Charles sniffing the data). I had done something similar in Android with Volley. How can I do the same with Flutter? 回答1: Create your client with a SecurityContext with no trusted roots to force the bad certificate callback, even for a good certificate. SecurityContext(withTrustedRoots: false); In the bad certificate callback, parse the DER encoded

How do I get public key hash for SSL pinning?

末鹿安然 提交于 2019-11-29 21:33:28
How would I get the hash of a public certificate's info to be able to perform SSL Pinning in my application? I am using TrustKit in my iOS application and it is asking for me to set the hash that I am expecting. Where can I get this from? If it is a public website, you can use SSL Labs server test which computes and displays the pin. The Public Key Pinning page over at the Mozilla Developer Network also has commands for obtaining the pin from a key file, a certificate signing request, a certificate or a website (this is the one in @mylogon's answer ). Since this is a programming web-site, i

Do I need to pin an anonymous delegate?

风流意气都作罢 提交于 2019-11-29 13:41:19
I am calling CopyFileEx from a C# application with an anonymous delegate being passed into the LPPROGRESS_ROUTINE parameter in order to get notifications on the file copy progress. My question is, does the anonymous delegate need to be pinned and why (or why not). In addition, does the answer change if: CopyFileEx was not blocking. If I passed in a delegate that was not anonymous. Thanks! The delegate does not need to be pinned . A managed object is pinned if it cannot be moved by the garbage collector. If the marshalling information is correct then the marshalling layer will ensure that a

Is this android SSL pinning implementation correct and why is this error showing up in the logcat?

你离开我真会死。 提交于 2019-11-29 03:19:09
问题 I am getting this error in my logcat. I have implemented ssl pinning in my android application. I think I have done something wrong which is causing this error. 05-19 17:39:54.998: E/NativeCrypto(30908): ssl=0x5eefaf80 cert_verify_callback x509_store_ctx=0x5dbea940 arg=0x0 05-19 17:39:54.998: E/NativeCrypto(30908): ssl=0x5eefaf80 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA Following is my ssl pinning android code. Which works but throws the above mentioned error.

How do I get public key hash for SSL pinning?

五迷三道 提交于 2019-11-28 17:07:35
问题 How would I get the hash of a public certificate's info to be able to perform SSL Pinning in my application? I am using TrustKit in my iOS application and it is asking for me to set the hash that I am expecting. Where can I get this from? 回答1: If it is a public website, you can use SSL Labs server test which computes and displays the pin. The Public Key Pinning page over at the Mozilla Developer Network also has commands for obtaining the pin from a key file, a certificate signing request, a

iOS certificate pinning with Swift and NSURLSession

跟風遠走 提交于 2019-11-28 04:47:31
Howto add certificate pinning to a NSURLSession in Swift? The OWASP website contains only an example for Objective-C and NSURLConnection. Swift 3 Update: Just define a delegate class for NSURLSessionDelegate and implement the didReceiveChallenge function ( this code is adapted from the objective-c OWASP example ): class NSURLSessionPinningDelegate: NSObject, URLSessionDelegate { func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Swift.Void) { // Adapted from OWASP https:/

iOS certificate pinning with Swift and NSURLSession

我怕爱的太早我们不能终老 提交于 2019-11-27 00:24:18
问题 Howto add certificate pinning to a NSURLSession in Swift? The OWASP website contains only an example for Objective-C and NSURLConnection. 回答1: Swift 3+ Update: Just define a delegate class for NSURLSessionDelegate and implement the didReceiveChallenge function ( this code is adapted from the objective-c OWASP example ): class NSURLSessionPinningDelegate: NSObject, URLSessionDelegate { func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: