Rate This Document
Findability
Accuracy
Completeness
Readability

Installing BoringSSL

  1. Download the BoringSSL source code.
    1
    2
    3
    4
    5
    cd /home
    git config --global http.sslVerify false
    git clone https://github.com/google/boringssl.git
    cd boringssl
    git checkout 6a7184066f6bf0e1d18b5ec38879dac28806aa07
    
  2. Set the environment variables.
    1. Open the /etc/profile file.
      1
      vim /etc/profile
      
    2. Press i to enter the insert mode and add the following content to the file:
      export BORINGSSL_HOME=/home/boringssl
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Make the new environment variables take effect.
      1
      source /etc/profile
      
  3. If the system architecture is AArch64, perform this step.
    1
    2
    mkdir build64
    cd build64
    
    cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_ASM_FLAGS=-Wa,--noexecstack \
    -GNinja ..

    1
    ninja
    

    If an error is reported when you run CMake:

    run the following command:

    yum -y install libunwind*

    If you need to build a 32-bit version, refer to this section.

    1
    2
    mkdir build32
    cd build32
    
    1
    2
    3
    4
    5
    cmake -DCMAKE_TOOLCHAIN_FILE=../util/32-bit-toolchain.cmake \
    -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_ASM_FLAGS="-Wa,--noexecstack -m32 -msse2" \
    -GNinja ..
    
    1
    ninja