Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
WebAuthn
Commits
2e520ee3
Commit
2e520ee3
authored
3 years ago
by
Lukas Buchs
Browse files
Options
Download
Patches
Plain Diff
Certificate Line Breaks
Handle certificates correctly already containing line breaks
parent
6bc7f0f0
master
v2.0.0-beta
v1.1.3
v1.1.2
v1.1.1
v1.1.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/WebAuthn.php
+2
-1
src/WebAuthn.php
with
2 additions
and
1 deletion
+2
-1
src/WebAuthn.php
+
2
−
1
View file @
2e520ee3
...
...
@@ -534,9 +534,10 @@ class WebAuthn {
$certContent
.
=
\
str_repeat
(
'-'
,
\
mb_strlen
(
$description
))
.
"
\n
"
;
foreach
(
$attestationRootCertificates
as
$attestationRootCertificate
)
{
$attestationRootCertificate
=
\
str_replace
([
"
\n
"
,
"
\r
"
,
' '
],
''
,
\
trim
(
$attestationRootCertificate
));
$count
++
;
$certContent
.
=
"
\n
-----BEGIN CERTIFICATE-----
\n
"
;
$certContent
.
=
\
chunk_split
(
\
trim
(
$attestationRootCertificate
)
,
64
,
"
\n
"
);
$certContent
.
=
\
chunk_split
(
$attestationRootCertificate
,
64
,
"
\n
"
);
$certContent
.
=
"-----END CERTIFICATE-----
\n
"
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets