Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
fb34f499
Commit
fb34f499
authored
11 years ago
by
Owen Winkler
Browse files
Options
Downloads
Patches
Plain Diff
Start a branch for easier OpenSSL configuration.
parent
06870a6e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/files_encryption/lib/crypt.php
+1
-0
1 addition, 0 deletions
apps/files_encryption/lib/crypt.php
apps/files_encryption/lib/helper.php
+11
-1
11 additions, 1 deletion
apps/files_encryption/lib/helper.php
config/config.sample.php
+5
-0
5 additions, 0 deletions
config/config.sample.php
with
17 additions
and
1 deletion
apps/files_encryption/lib/crypt.php
+
1
−
0
View file @
fb34f499
...
...
@@ -52,6 +52,7 @@ class Crypt {
$return
=
false
;
$res
=
\OCA\Encryption\Helper
::
getOpenSSLPkey
();
$res
=
openssl_pkey_new
(
array
(
'private_key_bits'
=>
4096
));
if
(
$res
===
false
)
{
...
...
This diff is collapsed.
Click to expand it.
apps/files_encryption/lib/helper.php
+
11
−
1
View file @
fb34f499
...
...
@@ -265,7 +265,7 @@ class Helper {
* @return bool true if configuration seems to be OK
*/
public
static
function
checkConfiguration
()
{
if
(
openssl_pkey_new
(
array
(
'private_key_bits'
=>
4096
)
))
{
if
(
self
::
getOpenSSLPkey
(
))
{
return
true
;
}
else
{
while
(
$msg
=
openssl_error_string
())
{
...
...
@@ -275,6 +275,16 @@ class Helper {
}
}
/**
* Create an openssl pkey with config-supplied settings
* @return resource The pkey resource created
*/
public
static
function
getOpenSSLPkey
()
{
$config
=
array
(
'private_key_bits'
=>
4096
);
$config
=
array_merge
(
\OCP\Config
::
getSystemValue
(
'openssl'
),
$config
);
return
openssl_pkey_new
(
$config
);
}
/**
* @brief glob uses different pattern than regular expressions, escape glob pattern only
* @param unescaped path
...
...
This diff is collapsed.
Click to expand it.
config/config.sample.php
+
5
−
0
View file @
fb34f499
...
...
@@ -214,4 +214,9 @@ $CONFIG = array(
'preview_libreoffice_path'
=>
'/usr/bin/libreoffice'
,
/* cl parameters for libreoffice / openoffice */
'preview_office_cl_parameters'
=>
''
,
// Extra SSL options to be used for configuration
'openssl'
=>
array
(
//'config' => '/path/to/openssl.cnf',
),
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment