-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from darkwebdesign/ISSUE-7
ISSUE-7: PemFile::validate asks for passphrase on OpenSSL 1.1.0g-fips 2 Nov 2017
- Loading branch information
Showing
11 changed files
with
149 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
|
||
readonly DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"; | ||
readonly SCRIPT="$(basename "${BASH_SOURCE[0]}")"; | ||
|
||
readonly VERSION="${1}"; | ||
readonly VERSION_PREFIX="$(echo "$VERSION" | sed --regexp-extended 's/^([0-9]+\.[0-9]+\.[0-9]+).*$/\1/')"; | ||
|
||
readonly ROOT_DIRECTORY="$(dirname "$DIR")"; | ||
readonly TEMP_DIRECTORY="$(mktemp --directory)"; | ||
readonly OUTPUT_DIRECTORY="$ROOT_DIRECTORY/build/openssl/$VERSION"; | ||
|
||
if [[ -z "$VERSION" ]]; then | ||
echo "$SCRIPT: no version specified!"; | ||
exit 1; | ||
fi; | ||
|
||
echo "VERSION: $VERSION"; | ||
echo "TEMP_DIRECTORY: $TEMP_DIRECTORY"; | ||
echo "OUTPUT_DIRECTORY: $OUTPUT_DIRECTORY"; | ||
|
||
read -p 'Press enter to continue...'; | ||
|
||
wget --timestamping --directory-prefix "$TEMP_DIRECTORY/" "https://www.openssl.org/source/openssl-$VERSION.tar.gz"; | ||
|
||
if [[ $? -ne 0 ]]; then | ||
wget --timestamping --directory-prefix "$TEMP_DIRECTORY/" "https://www.openssl.org/source/old/$VERSION_PREFIX/openssl-$VERSION.tar.gz"; | ||
|
||
if [[ $? -ne 0 ]]; then | ||
echo "$SCRIPT: version not found!"; | ||
exit 1; | ||
fi; | ||
fi; | ||
|
||
tar --extract --verbose --gzip --directory "$TEMP_DIRECTORY/" --file "$TEMP_DIRECTORY/openssl-$VERSION.tar.gz"; | ||
|
||
cd "$TEMP_DIRECTORY/openssl-$VERSION"; | ||
|
||
mkdir --parents "$OUTPUT_DIRECTORY"; | ||
|
||
./config --prefix="$OUTPUT_DIRECTORY" --openssldir="$OUTPUT_DIRECTORY"; | ||
|
||
make; | ||
make test; | ||
make install; | ||
|
||
rm -rf "$TEMP_DIRECTORY"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
readonly DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"; | ||
readonly SCRIPT="$(basename "${BASH_SOURCE[0]}")"; | ||
|
||
readonly VERSION="${1}"; | ||
|
||
readonly ROOT_DIRECTORY="$(dirname "$DIR")"; | ||
readonly BUILD_DIRECTORY="$ROOT_DIRECTORY/build/openssl/$VERSION"; | ||
readonly VENDOR_DIRECTORY="$ROOT_DIRECTORY/vendor"; | ||
|
||
if [[ -z "$VERSION" ]]; then | ||
echo "$SCRIPT: no version specified!"; | ||
exit 1; | ||
fi; | ||
|
||
if [[ ! -d "$BUILD_DIRECTORY" ]]; then | ||
echo "$SCRIPT: version build not found!"; | ||
exit 1; | ||
fi; | ||
|
||
export PATH="$BUILD_DIRECTORY/bin:$PATH"; | ||
export LD_LIBRARY_PATH="$BUILD_DIRECTORY/lib:$LD_LIBRARY_PATH"; | ||
|
||
cd "$ROOT_DIRECTORY"; | ||
|
||
"$VENDOR_DIRECTORY/bin/phpunit"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
use Symfony\Component\Process\Process; | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
$process = new Process('openssl version'); | ||
$process->mustRun(); | ||
|
||
echo $process->getOutput() . PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters