Skip to content

Commit

Permalink
Merge pull request #172 from alexw23/added-openssl-cnf
Browse files Browse the repository at this point in the history
Added openssl.cnf to bref layer
  • Loading branch information
mnapoli authored May 9, 2024
2 parents 7815db4 + 7d8d322 commit c192e4c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions php-80/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
# Copy the OpenSSL certificates file
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem

# Copy the OpenSSL config
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf


# ---------------------------------------------------------------
# Start from a clean image to copy only the files we need
Expand Down
3 changes: 3 additions & 0 deletions php-81/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
# Copy the OpenSSL certificates file
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem

# Copy the OpenSSL config
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf


# ---------------------------------------------------------------
# Start from a clean image to copy only the files we need
Expand Down
3 changes: 3 additions & 0 deletions php-82/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
# Copy the OpenSSL certificates file
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem

# Copy the OpenSSL config
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf


# ---------------------------------------------------------------
# Start from a clean image to copy only the files we need
Expand Down
3 changes: 3 additions & 0 deletions php-83/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
# Copy the OpenSSL certificates file
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem

# Copy the OpenSSL config
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf


# ---------------------------------------------------------------
# Start from a clean image to copy only the files we need
Expand Down
10 changes: 10 additions & 0 deletions tests/test_2_extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@
'curl-openssl-certificates-location' => openssl_get_cert_locations()['default_cert_file'] === '/opt/bref/ssl/cert.pem',
// Make sure we are using curl with our compiled libssh
'curl-libssh' => version_compare(str_replace('libssh2/', '', curl_version()['libssh_version']), '1.10.0', '>='),
'openssl' => (function() {
$private_key = openssl_pkey_new(['private_key_bits' => 2048]);
if ($private_key === false) {
return false;
}

$public_key_pem = openssl_pkey_get_details($private_key)['key'];
$details = openssl_pkey_get_details(openssl_pkey_get_public($public_key_pem));
return $details['bits'] === 2048;
})(),
'json' => function_exists('json_encode'),
'bcmath' => function_exists('bcadd'),
'ctype' => function_exists('ctype_digit'),
Expand Down

0 comments on commit c192e4c

Please sign in to comment.