|
|
|
@ -2,13 +2,16 @@ |
|
|
|
|
--- | |
|
|
|
|
<%! |
|
|
|
|
import subprocess, base64 |
|
|
|
|
import gzip |
|
|
|
|
import gzip, shutil, os |
|
|
|
|
|
|
|
|
|
boringssl_commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd='third_party/boringssl').decode().strip() |
|
|
|
|
prefix_f = open("src/boringssl/boringssl_prefix_symbols.h", "rb") |
|
|
|
|
prefix = prefix_f.read() |
|
|
|
|
prefix_gzip = gzip.compress(prefix) |
|
|
|
|
prefix_gzip_b64 = base64.b64encode(prefix_gzip) |
|
|
|
|
prefix_f.close() |
|
|
|
|
# TODO(mxyan): move to python3 style gzip compression when possible |
|
|
|
|
with open('src/boringssl/boringssl_prefix_symbols.h', 'rb') as f_in, gzip.open('src/boringssl/boringssl_prefix_symbols.h.gz', 'wb') as f_out: |
|
|
|
|
shutil.copyfileobj(f_in, f_out) |
|
|
|
|
with open('src/boringssl/boringssl_prefix_symbols.h.gz', 'rb') as f_in: |
|
|
|
|
prefix_gz = f_in.read() |
|
|
|
|
os.remove('src/boringssl/boringssl_prefix_symbols.h.gz') |
|
|
|
|
prefix_gz_b64 = base64.b64encode(prefix_gz) |
|
|
|
|
%> |
|
|
|
|
|
|
|
|
|
# This file has been automatically generated from a template file. |
|
|
|
@ -236,11 +239,11 @@ |
|
|
|
|
# this moment. It has to be generated by BoringSSL's users and be injected to BoringSSL build. |
|
|
|
|
# gRPC generates this file in script /tools/distrib/upgrade_boringssl_objc.sh. This script |
|
|
|
|
# outputs a gzip+base64 encoded version of boringssl_prefix_symbols.h because of Cocoapods' |
|
|
|
|
# limit on the 'prepare_command' field length. The encoded header is put at |
|
|
|
|
# /src/boringssl/boringssl_prefix_symbols.h.gz.b64. Here we decode the content and inject |
|
|
|
|
# the header to the correct location in BoringSSL. |
|
|
|
|
# limit on the 'prepare_command' field length. The encoded header is generated from |
|
|
|
|
# /src/boringssl/boringssl_prefix_symbols.h. Here we decode the content and inject the header to |
|
|
|
|
# the correct location in BoringSSL. |
|
|
|
|
base64 -D <<EOF | gunzip > include/openssl/boringssl_prefix_symbols.h |
|
|
|
|
${prefix_gzip_b64} |
|
|
|
|
${prefix_gz_b64} |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# We are renaming openssl to openssl_grpc so that there is no conflict with openssl if it exists |
|
|
|
|