Skip to content

Commit c192e4c

Browse files
authored
Merge pull request #172 from alexw23/added-openssl-cnf
Added openssl.cnf to bref layer
2 parents 7815db4 + 7d8d322 commit c192e4c

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

php-80/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
495495
# Copy the OpenSSL certificates file
496496
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem
497497

498+
# Copy the OpenSSL config
499+
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf
500+
498501

499502
# ---------------------------------------------------------------
500503
# Start from a clean image to copy only the files we need

php-81/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
496496
# Copy the OpenSSL certificates file
497497
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem
498498

499+
# Copy the OpenSSL config
500+
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf
501+
499502

500503
# ---------------------------------------------------------------
501504
# Start from a clean image to copy only the files we need

php-82/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
496496
# Copy the OpenSSL certificates file
497497
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem
498498

499+
# Copy the OpenSSL config
500+
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf
501+
499502

500503
# ---------------------------------------------------------------
501504
# Start from a clean image to copy only the files we need

php-83/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
496496
# Copy the OpenSSL certificates file
497497
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem
498498

499+
# Copy the OpenSSL config
500+
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf
501+
499502

500503
# ---------------------------------------------------------------
501504
# Start from a clean image to copy only the files we need

tests/test_2_extensions.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@
8989
'curl-openssl-certificates-location' => openssl_get_cert_locations()['default_cert_file'] === '/opt/bref/ssl/cert.pem',
9090
// Make sure we are using curl with our compiled libssh
9191
'curl-libssh' => version_compare(str_replace('libssh2/', '', curl_version()['libssh_version']), '1.10.0', '>='),
92+
'openssl' => (function() {
93+
$private_key = openssl_pkey_new(['private_key_bits' => 2048]);
94+
if ($private_key === false) {
95+
return false;
96+
}
97+
98+
$public_key_pem = openssl_pkey_get_details($private_key)['key'];
99+
$details = openssl_pkey_get_details(openssl_pkey_get_public($public_key_pem));
100+
return $details['bits'] === 2048;
101+
})(),
92102
'json' => function_exists('json_encode'),
93103
'bcmath' => function_exists('bcadd'),
94104
'ctype' => function_exists('ctype_digit'),

0 commit comments

Comments
 (0)