### Start Docker Deploy Environment Source: https://github.com/google/conscrypt/blob/master/release/README.md Starts a Docker container for the deploy environment. The container is deleted upon exit unless --rm=true is removed. ```bash $ docker run -it --rm=true conscrypt-deploy ``` -------------------------------- ### Get SSLContext using Default Provider (Java) Source: https://github.com/google/conscrypt/blob/master/README.md Obtain an SSLContext instance using the default highest-priority provider, typically the platform's Conscrypt. No provider name is specified to rely on the system's default order. ```java import javax.net.ssl.SSLContext; import java.security.Security; import java.security.Provider; try { // Get an SSLContext instance using the default highest-priority provider SSLContext sslContext = SSLContext.getInstance("TLS"); // Initialize and use sslContext // Example: Listing providers to see what's available // Provider[] providers = Security.getProviders(); // for (Provider provider : providers) { // System.out.println("Provider: " + provider.getName()); // } } catch (NoSuchAlgorithmException e) { // Handle exception e.printStackTrace(); } ``` -------------------------------- ### Get SSLContext using Default Provider (Kotlin) Source: https://github.com/google/conscrypt/blob/master/README.md Obtain an SSLContext instance using the default highest-priority provider, typically the platform's Conscrypt. No provider name is specified to rely on the system's default order. ```kotlin import javax.net.ssl.SSLContext import java.security.Security import java.security.Provider try { // Get an SSLContext instance using the default highest-priority provider val sslContext = SSLContext.getInstance("TLS") // Initialize and use sslContext // Example: Listing providers to see what's available // val providers = Security.getProviders() // providers.forEach { provider -> // println("Provider: " + provider.name) // } } catch (e: NoSuchAlgorithmException) { // Handle exception e.printStackTrace() } ``` -------------------------------- ### Build Android Release Source: https://github.com/google/conscrypt/blob/master/release/README.md Builds and publishes the Android release of Conscrypt. Requires the Android SDK to be installed. ```bash $ ./gradlew conscrypt-android:build $ ./gradlew conscrypt-android:publish -Dorg.gradle.parallel=false ``` -------------------------------- ### Create Initial Linux Build Source: https://github.com/google/conscrypt/blob/master/release/README.md Checks out the release branch and builds the Conscrypt OpenJDK release, then publishes it. Disables parallel Gradle execution for consistency. ```bash $ git checkout 1.0.x $ ./gradlew conscrypt-openjdk:build $ ./gradlew -Dorg.gradle.parallel=false publish ``` -------------------------------- ### Download and Set Up BoringSSL Source: https://github.com/google/conscrypt/blob/master/BUILDING.md Clone the BoringSSL repository and set the BORINGSSL_HOME environment variable to the cloned directory. This is a prerequisite for building Conscrypt. ```bash git clone https://boringssl.googlesource.com/boringssl cd boringssl # Also need to set an environment variable to point to the installation location. export BORINGSSL_HOME=$PWD ``` -------------------------------- ### Build Mac and Windows OpenJDK Releases Source: https://github.com/google/conscrypt/blob/master/release/README.md Builds the Mac and Windows OpenJDK releases. Requires syncing BoringSSL and compiling for both x86 and ARM architectures. ```bash $ git checkout $ cd build.x86 $ ninja $ cd ../build.arm $ ninja ``` ```bash $ ./gradlew conscrypt-openjdk:build $ ./gradlew conscrypt-openjdk:publish -Dorg.gradle.parallel=false -PrepositoryId= ``` -------------------------------- ### Build Conscrypt with Gradle Source: https://github.com/google/conscrypt/blob/master/BUILDING.md Run this command to build the Conscrypt project using Gradle. ```bash $ ./gradlew build ``` -------------------------------- ### Tag and Commit Release Version Source: https://github.com/google/conscrypt/blob/master/release/README.md Prepare for the release by updating the version in build.gradle to the specific release number (e.g., 1.0.0) and then tag the commit with the release version. ```bash # Change version in build.gradle to this version's number $ git commit -a -m 'Preparing version 1.0.0' $ git tag -a 1.0.0 -m 'Version 1.0.0' ``` -------------------------------- ### Copy Credentials and Keys to Docker Container Source: https://github.com/google/conscrypt/blob/master/release/README.md Copies GnuPG keys, gradle.properties, and keystore to the Docker container. Update signing.secretKeyRingFile and signingKeystore paths in gradle.properties accordingly. ```bash # mkdir /root/.gradle ``` ```bash $ docker cp ~/.gnupg :/root/ ``` ```bash $ docker cp ~/.gradle/gradle.properties :/root/.gradle/ ``` ```bash $ docker cp :/root/certkeystore ``` -------------------------------- ### Build BoringSSL on Linux (64-bit) Source: https://github.com/google/conscrypt/blob/master/BUILDING.md Compile the 64-bit version of BoringSSL on a 64-bit Linux machine using CMake and Ninja. Ensure position-independent code and a Release build type. ```bash mkdir build64 cd build64 cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_ASM_FLAGS=-Wa,--noexecstack \ -GNinja .. ninja ``` -------------------------------- ### Build Windows OpenJDK Release Source: https://github.com/google/conscrypt/blob/master/release/README.md Builds the Windows OpenJDK release after syncing BoringSSL and compiling. Requires a repository ID for publishing. ```bash $ git checkout $ cd build64 $ ninja ``` ```bash $ gradlew conscrypt-openjdk:build $ gradlew conscrypt-openjdk:publish -Dorg.gradle.parallel=false -PrepositoryId= ``` -------------------------------- ### Create and Push Release Branch Source: https://github.com/google/conscrypt/blob/master/release/README.md Create a new release branch named '..x' from 'master' and push it to GitHub. This branch will be used for all releases in a specific series. ```bash $ git checkout -b 1.0.x master $ git push upstream 1.0.x ``` -------------------------------- ### Build BoringSSL on Windows (64-bit) Source: https://github.com/google/conscrypt/blob/master/BUILDING.md Compile the 64-bit version of BoringSSL on Windows using CMake and Ninja. This command requires Visual Studio 2017 and sets up the necessary environment variables and build flags. ```bat call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 mkdir build64 cd build64 cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^ -GNinja .. ninja ``` -------------------------------- ### Build Linux OpenJDK Release with Docker Source: https://github.com/google/conscrypt/blob/master/release/README.md Builds the Linux OpenJDK release using Docker. Ensure you are in the conscrypt source directory before running. ```bash $ docker build -t conscrypt-deploy release ``` -------------------------------- ### Run Conscrypt Formatting Script Source: https://github.com/google/conscrypt/blob/master/skills/conscrypt_formatting/SKILL.md Execute this Python script to format C++, C, and Java files within the Conscrypt project. Ensure modified files are opened for edit in your VCS before running. ```bash python3 third_party/java_src/conscrypt/fix_format.py ``` -------------------------------- ### Configure Release Properties in gradle.properties Source: https://github.com/google/conscrypt/blob/master/release/README.md Add your OSSRH credentials, GPG key information, and code signing keystore details to your gradle.properties file. Ensure all sensitive information is correctly configured for signing and deployment. ```properties signing.keyId=<8-character-public-key-id> signing.password= signing.secretKeyRingFile=/.gnupg/secring.gpg signingKeystore= signingPassword= ossrhUsername= ossrhPassword= checkstyle.ignoreFailures=false ``` -------------------------------- ### Note BoringSSL Commit for Linux Build Source: https://github.com/google/conscrypt/blob/master/release/README.md Navigates to the BoringSSL directory and logs the latest commit hash, which should be noted for the release. ```bash $ cd /usr/src/boringssl $ git log -n 1 ``` -------------------------------- ### Xwing KEM Test Vector Parameters Source: https://github.com/google/conscrypt/blob/master/common/src/test/resources/crypto/xwing.txt Defines the parameters for a specific Xwing KEM test case, including ciphertext, shared secret, public key, and private key. ```python ct = b83aa828d4d62b9a83ceffe1d3d3bb1ef31264643c070c5798927e41fb07914a273f8f96e7826cd5375a283d7da885304c5de0516a0f0654243dc5b97f8bfeb831f68251219aabdd723bc6512041acbaef8af44265524942b902e68ffd23221cda70b1b55d776a92d1143ea3a0c475f63ee6890157c7116dae3f62bf72f60acd2bb8cc31ce2ba0de364f52b8ed38c79d719715963a5dd3842d8e8b43ab704e4759b5327bf027c63c8fa857c4908d5a8a7b88ac7f2be394d93c3706ddd4e698cc6ce370101f4d0213254238b4a2e8821b6e414a1cf20f6c1244b699046f5a01caa0a1a55516300b40d2048c77cc73afba79afeea9d2c0118bdf2adb8870dc328c5516cc45b1a2058141039e2c90a110a9e16b318dfb53bd49a126d6b73f215787517b8917cc01cabd107d06859854ee8b4f9861c226d3764c87339ab16c3667d2f49384e55456dd40414b70a6af841585f4c90c68725d57704ee8ee7ce6e2f9be582dbee985e038ffc346ebfb4e22158b6c84374a9ab4a44e1f91de5aac5197f89bc5e5442f51f9a5937b102ba3beaebf6e1c58380a4a5fedce4a4e5026f88f528f59ffd2db41752b3a3d90efabe463899b7d40870c530c8841e8712b733668ed033adbfafb2d49d37a44d4064e5863eb0af0a08d47b3cc888373bc05f7a33b841bc2587c57eb69554e8a3767b7506917b6b70498727f16eac1a36ec8d8cfaf751549f2277db277e8a55a9a5106b23a0206b4721fa9b3048552c5bd5b594d6e247f38c18c591aea7f56249c72ce7b117afcc3a8621582f9cf71787e183dee09367976e98409ad9217a497df888042384d7707a6b78f5f7fb8409e3b535175373461b776002d799cbad62860be70573ecbe13b246e0da7e93a52168e0fb6a9756b895ef7f0147a0dc81bfa644b088a9228160c0f9acf1379a2941cd28c06ebc80e44e17aa2f8177010afd78a97ce0868d1629ebb294c5151812c583daeb88685220f4da9118112e07041fcc24d5564a99fdbde28869fe0722387d7a9a4d16e1cc8555917e09944aa5ebaaaec2cf62693afad42a3f518fce67d273cc6c9fb5472b380e8573ec7de06a3ba2fd5f931d725b493026cb0acbd3fe62d00e4c790d965d7a03a3c0b4222ba8c2a9a16e2ac658f572ae0e746eafc4feba023576f08942278a041fb82a70a595d5bacbf297ce2029898a71e5c3b0d1c6228b485b1ade509b35fbca7eca97b2132e7cb6bc465375146b7dceac969308ac0c2ac89e7863eb8943015b24314cafb9c7c0e85fe543d56658c213632599efabfc1ec49dd8c88547bb2cc40c9d38cbd3099b4547840560531d0188cd1e9c23a0ebee0a03d5577d66b1d2bcb4baaf21cc7fef1e03806ca96299df0dfbc56e1b2b43e4fc20c37f834c4af62127e7dae86c3c25a2f696ac8b589dec71d595bfbe94b5ed4bc07d800b330796fda89edb77be0294136139354eb8cd37591578f9c600dd9be8ec6219fdd507adf3397ed4d68707b8d13b24ce4cd8fb22851bfe9d632407f31ed6f7cb1600de56f17576740ce2a32fc5145030145cfb97e63e0e41d354274a079d3e6fb2e15 ``` ```python ss = d2df0522128f09dd8e2c92b1e905c793d8f57a54c3da25861f10bf4ca613e384 ``` ```python name = TEST_2 ``` ```python sk = badfd6dfaac359a5efbb7bcc4b59d538df9a04302e10c8bc1cbf1a0b3a5120ea ``` ```python pk = 0333285fa253661508c9fb444852caa4061636cb060e69943b431400134ae1fbc02287247cb38068bbb89e6714af10a3fcda6613acc4b5e4b0d6eb960c302a0253b1f507b596f0884d351da89b01c35543214c8e542390b2bc497967961ef10286879c34316e6483b644fc27e8019d73024ba1d1cc83650bb068a5431b33d1221b3d122dc1239010a55cb13782140893f30aca7c09380255a0c621602ffbb6a9db064c1406d12723ab3bbe2950a21fe521b160b30b16724cc359754b4c88342651333ea9412d5137791cf75558ebc5c54c520dd6c622a059f6b332ccebb9f24103e59a297cd69e4a48a3bfe53a5958559e840db5c023f66c10ce23081c2c8261d744799ba078285cfa71ac51f44708d0a6212c3993340724b3ac38f63e82a889a4fc581f6b8353cc6233ac8f5394b6cca292f892360570a3031c90c4da3f02a895677390e60c24684a405f69ccf1a7b95312a47c844a4f9c2c4a37696dc10072a87bf41a2717d45b2a99ce09a4898d5a3f6b67085f9a626646bcf369982d483972b9cd7d244c4f49970f766a22507925eca7df99a491d80c27723e84c7b49b633a46b46785a16a41e02c538251622117364615d9c2cdaa1687a860c18bfc9ce8690efb2a524cb97cdfd1a4ea661fa7d08817998af838679b07c9db8455e2167a67c14d6a347522e89e8971270bec858364b1c1023b82c483cf8a8b76f040fe41c24dec2d49f6376170660605b80383391c4abad1136d874a77ef73b440758b6e7059add20873192e6e372e069c22c5425188e5c240cb3a6e29197ad17e87ec41a813af68531f262a6db25bbdb8a15d2ed9c9f35b9f2063890bd26ef09426f225aa1e6008d31600a29bcdf3b10d0bc72788d35e25f4976b3ca6ac7cbf0b442ae399b225d9714d0638a864bda7018d3b7c793bd2ace6ac68f4284d10977cc029cf203c5698f15a06b162d6c8b4fd40c6af40824f9c6101bb94e9327869ab7efd835dfc805367160d6c8571e3643ac70cbad5b96a1ad99352793f5af71705f95126cb4787392e94d808491a2245064ba5a7a30c066301392a6c315336e10dbc9c2177c7af382765b6c88eeab51588d01d6a95747f3652dc5b5c401a23863c7a0343737c737c99287a40a90896d4594730b552b910d23244684206f0eb842fb9aa316ab182282a75fb72b6806cea4774b822169c386a58773c3edc8229d85905abb87ac228f0f7a2ce9a497bb5325e17a6a82777a997c036c3b862d29c14682ad325a9600872f3913029a1588648ba590a7157809ff740b5138380015c40e9fb90f0311107946f28e5962e21666ad65092a3a60480cd16e61ff7fb5b44b70cf12201878428ef8067fceb1e1dcb49d66c773d312c7e53238cb620e126187009472d41036b702032411dc96cb750631df9d99452e495deb4300df660c8d35f32b424e98c7ed14b12d8ab11a289ac63c50a24d52925950e49ba6bf4c2c38953c92d60b6cd034e575c711ac41bfa66951f62b9392828d7b45aed377ac69c35f1c6b80f388f34e0bb9ce8167eb2bc630382825c396a407e905108081b444ac8a07c2507376a750d18248ee0a81c4318d9a38fc44c3b41e8681f87c34138442659512c41276e1cc8fc4eb66e12727bcb5a9e0e405cdea21538d6ea885ab169050e6b91e1b69f7ed34bcbb48fd4c562a576549f85b528c953926d96ea8a160b8843f1c89c62 ``` -------------------------------- ### Build BoringSSL on macOS (arm64) Source: https://github.com/google/conscrypt/blob/master/BUILDING.md Compile the arm64 version of BoringSSL on macOS using CMake and Ninja. This command specifies the arm64 architecture and enables position-independent code. ```bash mkdir build.arm cd build.arm cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_ASM_FLAGS=-Wa,--noexecstack \ -DCMAKE_OSX_ARCHITECTURES=arm64 \ -GNinja .. ninja ``` -------------------------------- ### Publish Conscrypt Artifacts to Maven Local Source: https://github.com/google/conscrypt/blob/master/BUILDING.md Execute this command to publish the built artifacts to your local Maven repository, making them available for use in other projects. ```bash $ ./gradlew publishToMavenLocal ``` -------------------------------- ### Build BoringSSL on macOS (x86_64) Source: https://github.com/google/conscrypt/blob/master/BUILDING.md Compile the x86_64 version of BoringSSL on macOS using CMake and Ninja. This command sets the architecture and ensures position-independent code. ```bash mkdir build.x86 cd build.x86 cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_ASM_FLAGS=-Wa,--noexecstack \ -DCMAKE_OSX_ARCHITECTURES=x86_64 \ -GNinja .. ninja ``` -------------------------------- ### Build Uber Jar Source: https://github.com/google/conscrypt/blob/master/release/README.md Builds the Uber Jar for Conscrypt after platform-specific jars are available on Maven Central. Requires reattaching to the Docker container if it was exited. ```bash # If you left the container, reattach to it $ docker container attach {CONTAINER_ID} ``` ```bash $ ./gradlew conscrypt-openjdk-uber:build -Dorg.conscrypt.openjdk.buildUberJar=true $ ./gradlew conscrypt-openjdk-uber:publish -Dorg.gradle.parallel=false -Dorg.conscrypt.openjdk.buildUberJar=true ``` -------------------------------- ### Generate Coverage Report Source: https://github.com/google/conscrypt/blob/master/BUILDING.md Run tests and generate a JaCoCo coverage report. The report will be located in the specified HTML path. ```bash ./gradlew check jacocoTestReport ``` -------------------------------- ### Push Release Branch and Tag Source: https://github.com/google/conscrypt/blob/master/release/README.md Push the updated release branch and the newly created tag to GitHub. This makes the release branch and tag available remotely. ```bash $ git push upstream 1.0.x $ git push upstream 1.0.0 ``` -------------------------------- ### OpenJDK Maven Dependency with Native Classifiers Source: https://github.com/google/conscrypt/blob/master/README.md Configure Maven to use the os-maven-plugin for automatically detecting the operating system and architecture to include the correct native Conscrypt artifact. ```xml kr.motd.maven os-maven-plugin 1.4.1.Final org.conscrypt conscrypt-openjdk 2.5.2 ${os.detected.classifier} ``` -------------------------------- ### Update Master Branch Version Source: https://github.com/google/conscrypt/blob/master/release/README.md Create a new branch to update the master branch's version to the next minor snapshot (X.Y+1-SNAPSHOT). Commit the changes and push for review. ```bash $ git checkout -b bump-version master # Change version in build.gradle to X.Y+1-SNAPSHOT $ git commit -a -m 'Start X.Y+1 development cycle' # Push to GitHub and get reviewed like normal ``` -------------------------------- ### Add Conscrypt Gradle Dependency Source: https://github.com/google/conscrypt/blob/master/README.md Add this dependency to your Gradle project for Conscrypt integration. ```gradle dependencies { compile 'org.conscrypt:conscrypt-openjdk-uber:2.5.2' } ``` -------------------------------- ### OpenJDK Gradle Dependency with Native Classifiers Source: https://github.com/google/conscrypt/blob/master/README.md Configure Gradle to use the osdetector-gradle-plugin, a wrapper around os-maven-plugin, to automatically detect the operating system and architecture for the Conscrypt dependency. ```gradle buildscript { repositories { mavenCentral() } dependencies { classpath 'com.google.gradle:osdetector-gradle-plugin:1.4.0' } } // Use the osdetector-gradle-plugin apply plugin: "com.google.osdetector" dependencies { compile 'org.conscrypt:conscrypt-openjdk:2.5.2:' + osdetector.classifier } ``` -------------------------------- ### Add Conscrypt Android Gradle Dependency Source: https://github.com/google/conscrypt/blob/master/README.md Use this implementation dependency for Conscrypt on Android projects. ```gradle dependencies { implementation 'org.conscrypt:conscrypt-android:2.5.2' } ``` -------------------------------- ### Cherry-pick Changes for Release Source: https://github.com/google/conscrypt/blob/master/release/README.md Cherry-pick desired changes from the master branch into the release branch since its creation. This ensures the release branch contains the latest relevant commits. ```bash $ git checkout 1.0.x $ git cherry-pick ``` -------------------------------- ### Add Conscrypt Maven Dependency Source: https://github.com/google/conscrypt/blob/master/README.md Include this dependency in your Maven project to use Conscrypt. ```xml org.conscrypt conscrypt-openjdk-uber 2.5.2 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.