Spring 5 WebClient using ssl

Looks like Spring 5.1.1 (Spring boot 2.1.0) removed HttpClientOptions from ReactorClientHttpConnector, so you can not configure options while creating instance of ReactorClientHttpConnector One option that works now is: val sslContext = SslContextBuilder .forClient() .trustManager(InsecureTrustManagerFactory.INSTANCE) .build() val httpClient = HttpClient.create().secure { t -> t.sslContext(sslContext) } val webClient = WebClient.builder().clientConnector(ReactorClientHttpConnector(httpClient)).build() Basically while creating the HttpClient, we are … Read more

Self-signed SSL Cert or CA? [closed]

There’s a common misconception that self-signed certificates are inherently less secure than those sold by commercial CA’s like GoDaddy and Verisign, and that you have to live with browser warnings/exceptions if you use them; this is incorrect. If you securely distribute a self-signed certificate (or CA cert, as bobince suggested) and install it in the … Read more

Self-signed SSL acceptance on Android

I have this functionality in exchangeIt, which connects to Microsoft exchange via WebDav. Here’s some code to create an HttpClient which will connect to self signed cert’s via SSL: SchemeRegistry schemeRegistry = new SchemeRegistry(); // http scheme schemeRegistry.register(new Scheme(“http”, PlainSocketFactory.getSocketFactory(), 80)); // https scheme schemeRegistry.register(new Scheme(“https”, new EasySSLSocketFactory(), 443)); HttpParams params = new BasicHttpParams(); params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, … Read more

SSL Localhost Privacy error

Allow Insecure SSL (localhost) In Chrome (including Version 111), enable allow insecure localhost: chrome://flags/#allow-insecure-localhost Refer to this Stack Overflow for more information. Allow Insecure SSL (other) See “Your connection is not private. blah-bla-blah“… Type thisisunsafe (key listeners pick it up). Notes If you are just curious if this works, browse this site which has a … Read more

unsigned APK can not be installed

I did not know that even with the “Allow Installation of non-Marked application”, I still needed to sign the application. I self-signed my application, following this link self-sign and release application, It only took 5 minutes, then I emailed the signed-APK file to myself and downloaded it to SD-card and then installed it without any … Read more

How can I create a self-signed certificate using C#?

Since .NET 4.7.2 you can create self-signed certs using System.Security.Cryptography.X509Certificates.CertificateRequest. For example: using System; using System.IO; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; public class CertificateUtil { static void MakeCert() { var ecdsa = ECDsa.Create(); // generate asymmetric key pair var req = new CertificateRequest(“cn=foobar”, ecdsa, HashAlgorithmName.SHA256); var cert = req.CreateSelfSigned(DateTimeOffset.Now, DateTimeOffset.Now.AddYears(5)); // Create PFX (PKCS #12) with … Read more

Can you use a service worker with a self-signed certificate?

As an alternative to using self-signed certificates, you can launch Chrome or Firefox such that it pretends certain domains are secure. For example, using Chrome on a Mac, you can launch it using: /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ –user-data-dir=/tmp/foo –unsafely-treat-insecure-origin-as-secure=http://www.your.site Service workers should then work from http://www.your.site. More info can be found here: Options for testing … Read more

How to create a self-signed certificate for a domain name for development on Windows 10 and below?

Using PowerShell From Windows 8.1 and Windows Server 2012 R2 (Windows PowerShell 4.0) and upwards, you can create a self-signed certificate using the new New-SelfSignedCertificate cmdlet: Examples: New-SelfSignedCertificate -DnsName www.mydomain.example -CertStoreLocation cert:\LocalMachine\My New-SelfSignedCertificate -DnsName subdomain.mydomain.example -CertStoreLocation cert:\LocalMachine\My New-SelfSignedCertificate -DnsName *.mydomain.example -CertStoreLocation cert:\LocalMachine\My Using the IIS Manager Launch the IIS Manager At the server level, under … Read more

Failed to load resource: net::ERR_INSECURE_RESPONSE

Your resource probably use a self-signed SSL certificate over HTTPS protocol. Chromium, so Google Chrome block by default this kind of resource considered unsecure. You can bypass this this way : Assuming your frame’s URL is https://www.domain.com, open a new tab in chrome and go to https://www.domain.com. Chrome will ask you to accept the SSL … Read more

File not found.