custom-cert-https | Custom certificate trust store on Android sample app
kandi X-RAY | custom-cert-https Summary
kandi X-RAY | custom-cert-https Summary
Custom Android certificate trust store sample app. Sample app for the blog post at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- On click handler
- Creates a new SSL context
- Reads the contents of the stream into a String
- Sets the system s trust store and dump the trusted certificates
- Default auth
- Start http connection
- Creates an HttpClient
- Do http connect
- Create an HTTP client using the default client
- Creates an HTTP client using the default socket factory
- Dump all trusted certificates
- Load the keystore from the keystore
- Initialize the activity
- Copy the truststore file to a local file
- Connect to a socket
- Find the X509TrustManager in the trust manager
- Returns true if the given socket is secure
- Check if the client is trusted
- Check server trusted
custom-cert-https Key Features
custom-cert-https Examples and Code Snippets
Community Discussions
Trending Discussions on custom-cert-https
QUESTION
I'm working on an app that connects two Android devices via Wifi so they can exchange files/data using TCP. Since Android Oreo (API level 26) there's finally an official API for this: WifiManager.startLocalOnlyHotspot()
. This creates a Wifi hotspot/network without internet access. The documentation says:
Applications should also be aware that this network will be shared with other applications. Applications are responsible for protecting their data on this network (e.g., TLS).
I have no experience in using TLS when it comes to connecting two devices via TCP, so I searched around and found some approaches mentioning self-signed certificates. I'm not sure wether this is a good practice; I can't get it working anyway. Any help is appreciated!
What I did so far:
I created a self-signed certificate using OpenSSL as described in this answer:
...
ANSWER
Answered 2018-Mar-27 at 14:04The problem here is that you've created a keystore that only contains the certificate, not its private key. (This is what keytool -import ...
does.)
One way to create a keystore that has a private key entry (with its corresponding certificate) would be to create a PKCS#12 store from OpenSSL and then convert it into BKS via keytool (more or less the same principle as here).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install custom-cert-https
You can use custom-cert-https like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the custom-cert-https component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page