Rename stuff
This commit is contained in:
parent
0f5daa8eb5
commit
5cb8947d7e
|
|
@ -1,303 +0,0 @@
|
||||||
version: 2.1
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
linux:
|
|
||||||
parameters:
|
|
||||||
target:
|
|
||||||
type: string
|
|
||||||
library:
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
dl_path:
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
version:
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
vendored:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
no_run:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
image:
|
|
||||||
type: string
|
|
||||||
default: 1.33.0
|
|
||||||
minimal_build:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
docker:
|
|
||||||
- image: rust:<< parameters.image >>
|
|
||||||
environment:
|
|
||||||
RUST_BACKTRACE: 1
|
|
||||||
OPENSSL_DIR: /opt/openssl
|
|
||||||
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
|
|
||||||
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar
|
|
||||||
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER: qemu-arm-static
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: apt-get update
|
|
||||||
- run: apt-get remove -y libssl-dev
|
|
||||||
- run: |
|
|
||||||
case "<< parameters.target >>" in
|
|
||||||
"i686-unknown-linux-gnu")
|
|
||||||
apt-get install -y --no-install-recommends gcc-multilib
|
|
||||||
;;
|
|
||||||
"x86_64-unknown-linux-musl")
|
|
||||||
apt-get install -y --no-install-recommends musl-tools
|
|
||||||
;;
|
|
||||||
"arm-unknown-linux-gnueabihf")
|
|
||||||
dpkg --add-architecture armhf
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
gcc-arm-linux-gnueabihf \
|
|
||||||
libc6-dev:armhf \
|
|
||||||
qemu-user-static
|
|
||||||
;;
|
|
||||||
"x86_64-unknown-linux-gnu")
|
|
||||||
exit 0
|
|
||||||
esac
|
|
||||||
|
|
||||||
rustup target add << parameters.target >>
|
|
||||||
- unless:
|
|
||||||
condition: << parameters.vendored >>
|
|
||||||
steps:
|
|
||||||
- restore_cache:
|
|
||||||
key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>
|
|
||||||
- run: |
|
|
||||||
if [ -d "$OPENSSL_DIR" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "<< parameters.library >>" in
|
|
||||||
"libressl")
|
|
||||||
URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-<< parameters.version >>.tar.gz"
|
|
||||||
;;
|
|
||||||
"openssl")
|
|
||||||
URL="https://openssl.org/source<< parameters.dl_path >>/openssl-<< parameters.version >>.tar.gz"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "<< parameters.target >>" in
|
|
||||||
"x86_64-unknown-linux-gnu")
|
|
||||||
OS_COMPILER=linux-x86_64
|
|
||||||
OS_FLAGS=""
|
|
||||||
;;
|
|
||||||
"i686-unknown-linux-gnu")
|
|
||||||
OS_COMPILER=linux-elf
|
|
||||||
OS_FLAGS=-m32
|
|
||||||
;;
|
|
||||||
"arm-unknown-linux-gnueabihf")
|
|
||||||
OS_COMPILER=linux-armv4
|
|
||||||
OS_FLAGS=""
|
|
||||||
export AR=arm-linux-gnueabihf-ar
|
|
||||||
export CC=arm-linux-gnueabihf-gcc
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
mkdir /tmp/build
|
|
||||||
cd /tmp/build
|
|
||||||
|
|
||||||
curl -L $URL | tar --strip-components=1 -xzf -
|
|
||||||
|
|
||||||
case "<< parameters.library >>" in
|
|
||||||
"openssl")
|
|
||||||
./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared
|
|
||||||
;;
|
|
||||||
"libressl")
|
|
||||||
./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
make
|
|
||||||
make install_sw
|
|
||||||
- save_cache:
|
|
||||||
key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>
|
|
||||||
paths:
|
|
||||||
- /opt/openssl
|
|
||||||
- restore_cache:
|
|
||||||
key: registry
|
|
||||||
- run: cargo generate-lockfile
|
|
||||||
- when:
|
|
||||||
condition: << parameters.minimal_build >>
|
|
||||||
steps:
|
|
||||||
- run: cargo update -p pkg-config --precise 0.3.14
|
|
||||||
- save_cache:
|
|
||||||
key: registry-{{ .BuildNum }}
|
|
||||||
paths:
|
|
||||||
- /usr/local/cargo/registry/index
|
|
||||||
- restore_cache:
|
|
||||||
key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }}
|
|
||||||
- run: |
|
|
||||||
cargo build \
|
|
||||||
--manifest-path=openssl/Cargo.toml \
|
|
||||||
<<# parameters.vendored >>--features vendored<</ parameters.vendored >> \
|
|
||||||
--target << parameters.target >>
|
|
||||||
- unless:
|
|
||||||
condition: << parameters.minimal_build >>
|
|
||||||
steps:
|
|
||||||
- run: |
|
|
||||||
cargo run \
|
|
||||||
--manifest-path=systest/Cargo.toml \
|
|
||||||
<<# parameters.vendored >>--features vendored<</ parameters.vendored >> \
|
|
||||||
--target << parameters.target >>
|
|
||||||
- run: |
|
|
||||||
cargo test \
|
|
||||||
--manifest-path=openssl-errors/Cargo.toml \
|
|
||||||
<<# parameters.vendored >>--features openssl-sys/vendored<</ parameters.vendored >> \
|
|
||||||
--target << parameters.target >> \
|
|
||||||
<<# parameters.no_run >>--no-run<</ parameters.no_run >>
|
|
||||||
- run: |
|
|
||||||
ulimit -c unlimited
|
|
||||||
cargo test \
|
|
||||||
--manifest-path=openssl/Cargo.toml \
|
|
||||||
<<# parameters.vendored >>--features vendored<</ parameters.vendored >> \
|
|
||||||
--target << parameters.target >> \
|
|
||||||
<<# parameters.no_run >>--no-run<</ parameters.no_run >>
|
|
||||||
- save_cache:
|
|
||||||
key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }}
|
|
||||||
paths:
|
|
||||||
- /usr/local/cargo/registry/cache
|
|
||||||
- target
|
|
||||||
- run:
|
|
||||||
command: |
|
|
||||||
mkdir -p /tmp/core_dumps
|
|
||||||
find . -name "core.*" -exec cp \{\} /tmp/core_dumps \;
|
|
||||||
cp target/<< parameters.target >>/debug/openssl-* /tmp/core_dumps
|
|
||||||
when: on_fail
|
|
||||||
- store_artifacts:
|
|
||||||
path: /tmp/core_dumps
|
|
||||||
|
|
||||||
macos:
|
|
||||||
parameters:
|
|
||||||
vendored:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
image:
|
|
||||||
type: string
|
|
||||||
default: 1.33.0
|
|
||||||
macos:
|
|
||||||
xcode: "9.0"
|
|
||||||
environment:
|
|
||||||
RUST_BACKTRACE: 1
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: sudo mkdir /opt
|
|
||||||
- run: sudo chown -R $USER /usr/local/ /opt
|
|
||||||
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain << parameters.image >>
|
|
||||||
- run: sudo ln -s ~/.cargo/bin/* /usr/local/bin
|
|
||||||
- run: cargo generate-lockfile
|
|
||||||
- restore_cache:
|
|
||||||
key: deps-<< parameters.image >>-macos-<< parameters.vendored >>-{{ checksum "Cargo.lock" }}
|
|
||||||
- run: |
|
|
||||||
cargo run \
|
|
||||||
--manifest-path=systest/Cargo.toml \
|
|
||||||
<<# parameters.vendored >> --features vendored <</ parameters.vendored >>
|
|
||||||
- run: |
|
|
||||||
cargo test \
|
|
||||||
--manifest-path=openssl-errors/Cargo.toml \
|
|
||||||
<<# parameters.vendored >> --features openssl-sys/vendored <</ parameters.vendored >>
|
|
||||||
- run: |
|
|
||||||
cargo test \
|
|
||||||
--manifest-path=openssl/Cargo.toml \
|
|
||||||
<<# parameters.vendored >> --features vendored <</ parameters.vendored >>
|
|
||||||
- save_cache:
|
|
||||||
key: deps-<< parameters.image >>-macos-<< parameters.vendored >>-{{ checksum "Cargo.lock" }}
|
|
||||||
paths:
|
|
||||||
- ~/.cargo/registry/cache
|
|
||||||
- target
|
|
||||||
|
|
||||||
openssl_111: &openssl_111
|
|
||||||
library: openssl
|
|
||||||
version: 1.1.1h
|
|
||||||
openssl_110: &openssl_110
|
|
||||||
library: openssl
|
|
||||||
version: 1.1.0l
|
|
||||||
dl_path: /old/1.1.0
|
|
||||||
openssl_102: &openssl_102
|
|
||||||
library: openssl
|
|
||||||
version: 1.0.2u
|
|
||||||
dl_path: /old/1.0.2
|
|
||||||
openssl_101: &openssl_101
|
|
||||||
library: openssl
|
|
||||||
version: 1.0.1u
|
|
||||||
dl_path: /old/1.0.1
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
test:
|
|
||||||
jobs:
|
|
||||||
- linux:
|
|
||||||
name: musl-vendored
|
|
||||||
target: x86_64-unknown-linux-musl
|
|
||||||
vendored: true
|
|
||||||
- linux:
|
|
||||||
name: x86_64-vendored
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
vendored: true
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_111
|
|
||||||
name: x86_64-openssl-1.1.1
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_110
|
|
||||||
name: x86_64-openssl-1.1.0
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_102
|
|
||||||
name: x86_64-openssl-1.0.2
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_101
|
|
||||||
name: x86_64-openssl-1.0.1
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
- linux:
|
|
||||||
name: i686-vendored
|
|
||||||
target: i686-unknown-linux-gnu
|
|
||||||
vendored: true
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_111
|
|
||||||
name: i686-openssl-1.1.1
|
|
||||||
target: i686-unknown-linux-gnu
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_110
|
|
||||||
name: i686-openssl-1.1.0
|
|
||||||
target: i686-unknown-linux-gnu
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_102
|
|
||||||
name: i686-openssl-1.0.2
|
|
||||||
target: i686-unknown-linux-gnu
|
|
||||||
- linux:
|
|
||||||
name: armhf-vendored
|
|
||||||
target: arm-unknown-linux-gnueabihf
|
|
||||||
vendored: true
|
|
||||||
no_run: true
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_111
|
|
||||||
name: armhf-openssl-1.1.1
|
|
||||||
target: arm-unknown-linux-gnueabihf
|
|
||||||
no_run: true
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_110
|
|
||||||
name: armhf-openssl-1.1.0
|
|
||||||
target: arm-unknown-linux-gnueabihf
|
|
||||||
no_run: true
|
|
||||||
- linux:
|
|
||||||
<<: *openssl_102
|
|
||||||
name: armhf-openssl-1.0.2
|
|
||||||
target: arm-unknown-linux-gnueabihf
|
|
||||||
no_run: true
|
|
||||||
- linux:
|
|
||||||
name: x86_64-libressl-2.5
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
library: libressl
|
|
||||||
version: 2.5.5
|
|
||||||
- linux:
|
|
||||||
name: x86_64-libressl-3.2.0
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
library: libressl
|
|
||||||
version: 3.2.0
|
|
||||||
- macos:
|
|
||||||
name: macos
|
|
||||||
- macos:
|
|
||||||
name: macos-vendored
|
|
||||||
vendored: true
|
|
||||||
|
|
@ -3,3 +3,4 @@ Cargo.lock
|
||||||
.idea/
|
.idea/
|
||||||
*.iml
|
*.iml
|
||||||
.vscode/
|
.vscode/
|
||||||
|
.DS_Store
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[submodule "openssl-sys/deps/boringssl"]
|
[submodule "boring-sys/deps/boringssl"]
|
||||||
path = openssl-sys/deps/boringssl
|
path = boring-sys/deps/boringssl
|
||||||
url = https://github.com/google/boringssl.git
|
url = https://github.com/google/boringssl.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"openssl",
|
"boring",
|
||||||
"openssl-sys",
|
"boring-sys",
|
||||||
"systest"
|
"systest"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
18
README.md
18
README.md
|
|
@ -1,19 +1,14 @@
|
||||||
# rust-openssl
|
# boring
|
||||||
|
|
||||||
[](https://circleci.com/gh/sfackler/rust-openssl)
|
[](https://crates.io/crates/boring)
|
||||||
[](https://crates.io/crates/openssl)
|
|
||||||
|
|
||||||
OpenSSL bindings for the Rust programming language.
|
BoringSSL bindings for the Rust programming language.
|
||||||
|
|
||||||
[Documentation](https://docs.rs/openssl).
|
[Documentation](https://docs.rs/boring).
|
||||||
|
|
||||||
## Release Support
|
## Release Support
|
||||||
|
|
||||||
The current supported release of `openssl` is 0.10 and `openssl-sys` is 0.9.
|
The crate statically links with the latest BoringSSL master branch.
|
||||||
|
|
||||||
New major versions will be published at most once per year. After a new
|
|
||||||
release, the previous major version will be partially supported with bug
|
|
||||||
fixes for 3 months, after which support will be dropped entirely.
|
|
||||||
|
|
||||||
### Contribution
|
### Contribution
|
||||||
|
|
||||||
|
|
@ -21,3 +16,6 @@ Unless you explicitly state otherwise, any contribution intentionally
|
||||||
submitted for inclusion in the work by you, as defined in the Apache-2.0
|
submitted for inclusion in the work by you, as defined in the Apache-2.0
|
||||||
license, shall be dual licensed under the terms of both the Apache License,
|
license, shall be dual licensed under the terms of both the Apache License,
|
||||||
Version 2.0 and the MIT license without any additional terms or conditions.
|
Version 2.0 and the MIT license without any additional terms or conditions.
|
||||||
|
|
||||||
|
## Accolades
|
||||||
|
The project is based on a fork of [rust-openssl](https://github.com/sfackler/rust-openssl).
|
||||||
157
THIRD_PARTY
157
THIRD_PARTY
|
|
@ -1,4 +1,30 @@
|
||||||
rust-openssl contains code from OpenSSL, under the following license:
|
rust-openssl contains code from BoringSSL, under the following license:
|
||||||
|
|
||||||
|
BoringSSL License
|
||||||
|
---------------
|
||||||
|
BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL
|
||||||
|
licensing. Files that are completely new have a Google copyright and an ISC
|
||||||
|
license. This license is reproduced at the bottom of this file.
|
||||||
|
|
||||||
|
Contributors to BoringSSL are required to follow the CLA rules for Chromium:
|
||||||
|
https://cla.developers.google.com/clas
|
||||||
|
|
||||||
|
Files in third_party/ have their own licenses, as described therein. The MIT
|
||||||
|
license, for third_party/fiat, which, unlike other third_party directories, is
|
||||||
|
compiled into non-test libraries, is included below.
|
||||||
|
|
||||||
|
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the
|
||||||
|
OpenSSL License and the original SSLeay license apply to the toolkit. See below
|
||||||
|
for the actual license texts. Actually both licenses are BSD-style Open Source
|
||||||
|
licenses. In case of any license issues related to OpenSSL please contact
|
||||||
|
openssl-core@openssl.org.
|
||||||
|
|
||||||
|
The following are Google-internal bug numbers where explicit permission from
|
||||||
|
some authors is recorded for use of their work. (This is purely for our own
|
||||||
|
record keeping.)
|
||||||
|
27287199
|
||||||
|
27287880
|
||||||
|
27287883
|
||||||
|
|
||||||
OpenSSL License
|
OpenSSL License
|
||||||
---------------
|
---------------
|
||||||
|
|
@ -117,32 +143,113 @@ OpenSSL License
|
||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
===============================================================================
|
|
||||||
|
|
||||||
openssl-sys
|
ISC license used for completely new code in BoringSSL:
|
||||||
|
|
||||||
Copyright (c) 2014 Alex Crichton
|
/* Copyright (c) 2015, Google Inc.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||||
|
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any
|
|
||||||
person obtaining a copy of this software and associated
|
|
||||||
documentation files (the "Software"), to deal in the
|
|
||||||
Software without restriction, including without
|
|
||||||
limitation the rights to use, copy, modify, merge,
|
|
||||||
publish, distribute, sublicense, and/or sell copies of
|
|
||||||
the Software, and to permit persons to whom the Software
|
|
||||||
is furnished to do so, subject to the following
|
|
||||||
conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice
|
The code in third_party/fiat carries the MIT license:
|
||||||
shall be included in all copies or substantial portions
|
|
||||||
of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
Copyright (c) 2015-2016 the fiat-crypto authors (see
|
||||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS).
|
||||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
in the Software without restriction, including without limitation the rights
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
DEALINGS IN THE SOFTWARE.
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
Licenses for support code
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Parts of the TLS test suite are under the Go license. This code is not included
|
||||||
|
in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so
|
||||||
|
distributing code linked against BoringSSL does not trigger this license:
|
||||||
|
|
||||||
|
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
|
in the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
* Neither the name of Google Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
BoringSSL uses the Chromium test infrastructure to run a continuous build,
|
||||||
|
trybots etc. The scripts which manage this, and the script for generating build
|
||||||
|
metadata, are under the Chromium license. Distributing code linked against
|
||||||
|
BoringSSL does not trigger this license.
|
||||||
|
|
||||||
|
Copyright 2015 The Chromium Authors. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
|
in the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
* Neither the name of Google Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
[package]
|
||||||
|
name = "boring-sys"
|
||||||
|
version = "1.0.0"
|
||||||
|
authors = ["Alex Crichton <alex@alexcrichton.com>",
|
||||||
|
"Steven Fackler <sfackler@gmail.com>",
|
||||||
|
"Ivan Nikulin <ifaaan@gmail.com>"]
|
||||||
|
license = "MIT"
|
||||||
|
description = "FFI bindings to BoringSSL"
|
||||||
|
repository = "https://github.com/inikulin/boring"
|
||||||
|
readme = "README.md"
|
||||||
|
categories = ["cryptography", "external-ffi-bindings"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
libc = "0.2"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
cmake = "0.1"
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
Copyright (c) 2014 Alex Crichton
|
Copyright (c) 2014 Alex Crichton
|
||||||
|
Copyright (c) 2020 Ivan Nikulin <ifaaan@gmail.com>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any
|
Permission is hereby granted, free of charge, to any
|
||||||
person obtaining a copy of this software and associated
|
person obtaining a copy of this software and associated
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
// NOTE: this build script is adopted from quiche (https://github.com/cloudflare/quiche)
|
||||||
|
|
||||||
// Additional parameters for Android build of BoringSSL.
|
// Additional parameters for Android build of BoringSSL.
|
||||||
//
|
//
|
||||||
// Android NDK < 18 with GCC.
|
// Android NDK < 18 with GCC.
|
||||||
|
|
@ -170,7 +172,6 @@ fn get_boringssl_cmake_config() -> cmake::Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let bssl_dir = std::env::var("QUICHE_BSSL_PATH").unwrap_or_else(|_| {
|
|
||||||
let mut cfg = get_boringssl_cmake_config();
|
let mut cfg = get_boringssl_cmake_config();
|
||||||
|
|
||||||
if cfg!(feature = "fuzzing") {
|
if cfg!(feature = "fuzzing") {
|
||||||
|
|
@ -178,9 +179,7 @@ fn main() {
|
||||||
.cxxflag("-DBORINGSSL_UNSAFE_FUZZER_MODE");
|
.cxxflag("-DBORINGSSL_UNSAFE_FUZZER_MODE");
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.build_target("bssl").build().display().to_string()
|
let bssl_dir = cfg.build_target("bssl").build().display().to_string();
|
||||||
});
|
|
||||||
|
|
||||||
let build_path = get_boringssl_platform_output_path();
|
let build_path = get_boringssl_platform_output_path();
|
||||||
let build_dir = format!("{}/build/{}", bssl_dir, build_path);
|
let build_dir = format!("{}/build/{}", bssl_dir, build_path);
|
||||||
println!("cargo:rustc-link-search=native={}", build_dir);
|
println!("cargo:rustc-link-search=native={}", build_dir);
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
overflowing_literals,
|
overflowing_literals,
|
||||||
unused_imports
|
unused_imports
|
||||||
)]
|
)]
|
||||||
#![doc(html_root_url = "https://docs.rs/openssl-sys/0.9")]
|
#![doc(html_root_url = "https://docs.rs/boring-sys")]
|
||||||
|
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
[package]
|
||||||
|
name = "boring"
|
||||||
|
version = "1.0.0"
|
||||||
|
authors = ["Steven Fackler <sfackler@gmail.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
||||||
|
license = "Apache-2.0"
|
||||||
|
description = "BoringSSL bindings"
|
||||||
|
repository = "https://github.com/inikulin/boring"
|
||||||
|
readme = "README.md"
|
||||||
|
keywords = ["crypto", "tls", "ssl", "dtls"]
|
||||||
|
categories = ["cryptography", "api-bindings"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
bitflags = "1.0"
|
||||||
|
foreign-types = "0.3.1"
|
||||||
|
lazy_static = "1"
|
||||||
|
libc = "0.2"
|
||||||
|
boring-sys = { version = "1.0.0", path = "../boring-sys" }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tempdir = "0.3"
|
||||||
|
hex = "0.3"
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
Copyright 2011-2017 Google Inc.
|
Copyright 2011-2017 Google Inc.
|
||||||
2013 Jack Lloyd
|
2013 Jack Lloyd
|
||||||
2013-2014 Steven Fackler
|
2013-2014 Steven Fackler
|
||||||
|
2020 Ivan Nikulin <ifaaan@gmail.com>
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
use ffi;
|
use ffi;
|
||||||
|
use ffi::BIO_new_mem_buf;
|
||||||
use libc::c_int;
|
use libc::c_int;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::slice;
|
use std::slice;
|
||||||
use ffi::BIO_new_mem_buf;
|
|
||||||
|
|
||||||
use cvt_p;
|
use cvt_p;
|
||||||
use error::ErrorStack;
|
use error::ErrorStack;
|
||||||
|
|
@ -68,6 +68,3 @@ impl MemBio {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6,9 +6,9 @@ use std::ops::{Deref, DerefMut};
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
use error::ErrorStack;
|
use error::ErrorStack;
|
||||||
|
use ffi::{EVP_MD_CTX_free, EVP_MD_CTX_new};
|
||||||
use nid::Nid;
|
use nid::Nid;
|
||||||
use {cvt, cvt_p};
|
use {cvt, cvt_p};
|
||||||
use ffi::{EVP_MD_CTX_free, EVP_MD_CTX_new};
|
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq)]
|
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||||
pub struct MessageDigest(*const ffi::EVP_MD);
|
pub struct MessageDigest(*const ffi::EVP_MD);
|
||||||
|
|
@ -10,8 +10,8 @@ extern crate bitflags;
|
||||||
extern crate foreign_types;
|
extern crate foreign_types;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
extern crate boring_sys as ffi;
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
extern crate openssl_sys as ffi;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern crate hex;
|
extern crate hex;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue