Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
1120bbb8
Commit
1120bbb8
authored
Dec 15, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) add cert_type to certmanager, related to
https://github.com/opnsense/core/issues/81
parent
b57cdb64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
system_certmanager.php
src/www/system_certmanager.php
+20
-5
No files found.
src/www/system_certmanager.php
View file @
1120bbb8
...
...
@@ -133,6 +133,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig
[
'csr_keylen'
]
=
"2048"
;
$pconfig
[
'csr_digest_alg'
]
=
"sha256"
;
$pconfig
[
'lifetime'
]
=
"365"
;
$pconfig
[
'cert_type'
]
=
"usr_cert"
;
$pconfig
[
'cert'
]
=
null
;
$pconfig
[
'key'
]
=
null
;
$pconfig
[
'dn_country'
]
=
null
;
...
...
@@ -445,7 +446,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig
[
'keylen'
],
$pconfig
[
'lifetime'
],
$dn
,
$pconfig
[
'digest_alg'
]
$pconfig
[
'digest_alg'
],
$pconfig
[
'cert_type'
]
))
{
$input_errors
=
array
();
while
(
$ssl_err
=
openssl_error_string
())
{
...
...
@@ -780,10 +782,23 @@ $( document ).ready(function() {
</div>
</td>
</tr>
<tr>
<td><a
id=
"help_for_digest_cert_type"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Type"
);
?>
</td>
<td>
<select
name=
"cert_type"
>
<option
value=
"usr_cert"
<?=
$pconfig
[
'cert_type'
]
==
'usr_cert'
?
"selected=
\"
selected
\"
"
:
""
;
?>
>
<?=
gettext
(
"Client Certificate"
);
?>
</option>
<option
value=
"server_cert"
<?=
$pconfig
[
'cert_type'
]
==
'server_cert'
?
"selected=
\"
selected
\"
"
:
""
;
?>
>
<?=
gettext
(
"Server Certificate"
);
?>
</option>
<option
value=
"v3_ca"
<?=
$pconfig
[
'cert_type'
]
==
'v3_ca'
?
"selected=
\"
selected
\"
"
:
""
;
?>
>
<?=
gettext
(
"Certificate Authority"
);
?>
</option>
</select>
<div
class=
"hidden"
for=
"help_for_digest_cert_type"
>
<?=
gettext
(
"Choose the type of certificate to generate here, the type defines it's constraints"
);
?>
</div>
</td>
</tr>
<tr>
<td><i
class=
"fa fa-info-circle text-muted"
></i>
<?=
gettext
(
"Key length"
);
?>
(
<?=
gettext
(
"bits"
);
?>
)
</td>
<td>
<select
name=
'keylen'
class=
"formselect"
>
<select
name=
'keylen'
>
<?php
foreach
(
$cert_keylens
as
$len
)
:?>
<
option
value
=
"<?=
$len
;?>"
<?=
$pconfig
[
'keylen'
]
==
$len
?
"selected=
\"
selected
\"
"
:
""
;
?>
>
<?=
$len
;
?>
</option>
...
...
@@ -795,7 +810,7 @@ $( document ).ready(function() {
<tr>
<td><a
id=
"help_for_digest_alg"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Digest Algorithm"
);
?>
</td>
<td>
<select
name=
'digest_alg'
id=
'digest_alg'
class=
"formselect"
>
<select
name=
'digest_alg'
id=
'digest_alg'
>
<?php
foreach
(
$openssl_digest_algs
as
$digest_alg
)
:?>
<
option
value
=
"<?=
$digest_alg
;?>"
<?=
$pconfig
[
'digest_alg'
]
==
$digest_alg
?
"selected=
\"
selected
\"
"
:
""
;
?>
>
...
...
@@ -979,7 +994,7 @@ $( document ).ready(function() {
<tr>
<td><a
id=
"help_for_csr_digest_alg"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Digest Algorithm"
);
?>
</td>
<td>
<select
name=
'csr_digest_alg'
class=
"formselect"
>
<select
name=
'csr_digest_alg'
>
<?php
foreach
(
$openssl_digest_algs
as
$csr_digest_alg
)
:?>
<
option
value
=
"<?=
$csr_digest_alg
;?>"
<?=
$pconfig
[
'csr_digest_alg'
]
==
$csr_digest_alg
?
$pconfig
[
'csr_digest_alg'
]
==
$csr_digest_alg
:
""
;
?>
>
...
...
@@ -1078,7 +1093,7 @@ $( document ).ready(function() {
<tr>
<td
width=
"22%"
><i
class=
"fa fa-info-circle text-muted"
></i>
<?=
gettext
(
"Existing Certificates"
);
?>
</td>
<td
width=
"78%"
>
<select
name=
'certref'
class=
"formselect"
>
<select
name=
'certref'
>
<?php
foreach
(
$config
[
'cert'
]
as
$cert
)
:
$caname
=
""
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment