Tag Archives: Received fatal alert: protocol_version

Failed to create webapp project with Maven in idea (without SRC and other file directory): received fatal Alert: Protocol_ Version solution

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

Specific steps:

1. First, add a configuration to Maven Runtime: – dhttps. Protocols = tlsv1.2, as shown in the following figure

2. Create project or module

3. When selecting a webapp template, use the Maven below instead of the coco above

3. The rest is the normal flow of things, not to repeat

Created web project structure:


explain why :

Due to the insecurity of tlsv1.1 protocol and the PCI security standard, maven sonatype central warehouse no longer supports tlsv1.1 and the following protocol versions from June 18, 2018

For the original text, please refer to the official explanation of no longer supports tlsv1.1 and below

The JDK I use is 1.7. Although jdk1.7 supports TLS 1.2, it is disabled by default, so the received fatal Alert: protocol above will appear_ Version exception

The following table shows the default TLS protocol used by JDK in different versions of Oracle documents:

solutions:

scheme 1: upgrade JDK to 1.8

JDK1.8 TLS 1.2 is enabled by default, and this exception will not occur

PS: the price can be a bit high, especially for some old projects, which can not be upgraded just by upgrading

scheme 2: enable TLS 1.2 by adding – dhttps. Protocols = tlsv1.2 and configuring the Java runtime parameter

summary: if you are JDK 1.7, both schemes are OK (this article uses the second scheme). If you are 1.6 or below, it is recommended to upgrade JDK