Skip to content

Commit

Permalink
Merge pull request #4570 from ballerina-platform/master
Browse files Browse the repository at this point in the history
Sync master and 2201.7.x
  • Loading branch information
LakshanWeerasinghe authored Jun 19, 2023
2 parents 8097314 + 1416eb9 commit 0182cf8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 33 deletions.
9 changes: 0 additions & 9 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
CVE-2020-7768
CVE-2021-3737
CVE-2021-3997
CVE-2022-42003
CVE-2022-40151
CVE-2022-40152
CVE-2022-40153
CVE-2022-40154
CVE-2022-40155
CVE-2022-40156
CVE-2022-41854
CVE-2022-1471
Original file line number Diff line number Diff line change
Expand Up @@ -39,34 +39,14 @@ public class Utils {
System.getenv("BALLERINA_STAGING_UPDATE"));
public static final PrintStream OUT = System.out;

private static TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}

public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {
//No need to implement.
}

public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) {
//No need to implement.
}
}
};

public static final String DISTRIBUTION_LOCATION = "http://dist-dev.ballerina.io/downloads/";
public static final String DISTRIBUTION_LOCATION = "https://dist-dev.ballerina.io/downloads/";

public static void downloadFile(String version, String installerName) {
OUT.println("Downloading " + installerName);
try {
String destination = getUserHome();
File output = new File(destination + File.separator + installerName);
if (!output.exists()) {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());

HttpURLConnection conn = (HttpURLConnection) new URL(
DISTRIBUTION_LOCATION + version + "/" + installerName).openConnection();
conn.setRequestProperty("content-type", "binary/data");
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ group=org.ballerinalang
# During the release workflow, the following will get bumped automatically
version=2201.7.0-SNAPSHOT
codeName=swan-lake
ballerinaLangVersion=2201.6.0-20230612-002700-7861756b
ballerinaLangVersion=2201.7.0-20230619-002200-a3db2e99
ballerinaJreVersion=1.1.0
dependencyJREVersion=jdk-11.0.18+10-jre
specVersion=2022R4
Expand Down Expand Up @@ -46,8 +46,8 @@ stdlibAuthVersion=2.8.0
stdlibEmailVersion=2.7.1
stdlibJwtVersion=2.8.0
stdlibOAuth2Version=2.8.0
stdlibYamlVersion=0.3.0
stdlibTomlVersion=0.3.0
stdlibYamlVersion=0.3.1-20230612-141800-3f686c6
stdlibTomlVersion=0.3.1-20230609-180200-0462a55
stdlibEdiVersion=1.0.1

# Stdlib Level 05
Expand Down

0 comments on commit 0182cf8

Please sign in to comment.