Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
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
Administrator
Openfire
Commits
14fc54d6
Commit
14fc54d6
authored
Jan 16, 2016
by
André Berenguel
Committed by
Guus der Kinderen
Jan 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reactivate self-signed certificates generation
parent
e08055a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
security-keystore.jsp
src/web/security-keystore.jsp
+8
-15
No files found.
src/web/security-keystore.jsp
View file @
14fc54d6
...
...
@@ -87,34 +87,27 @@
pageContext
.
setAttribute
(
"errors"
,
errors
);
/**
if
(
generate
)
{
String
domain
=
XMPPServer
.
getInstance
().
getServerInfo
().
getXMPPDomain
();
try
{
if
(
errors
.
containsKey
(
"ioerror"
)
&&
keyStore
==
null
)
{
keyStore
=
sslConfig
.
initializeKeyStore
();
}
if
(
errors
.
containsKey
(
"ioerror"
)
||
!
CertificateManager
.
isDSACertificate
(
keyStore
,
domain
))
{
CertificateManager
.
createDSACert
(
keyStore
,
sslConfig
.
getKeyStorePassword
(),
domain
+
"_dsa"
,
"cn="
+
domain
,
"cn="
+
domain
,
"*."
+
domain
);
if
(
errors
.
containsKey
(
"ioerror"
)
||
!
identityStore
.
containsDomainCertificate
(
"DSA"
))
{
identityStore
.
addSelfSignedDomainCertificate
(
"DSA"
);
}
if
(
errors
.
containsKey
(
"ioerror"
)
||
!
CertificateManager
.
isRSACertificate
(
keyStore
,
domain
))
{
CertificateManager
.
createRSACert
(
keyStore
,
sslConfig
.
getKeyStorePassword
(),
domain
+
"_rsa"
,
"cn="
+
domain
,
"cn="
+
domain
,
"*."
+
domain
);
if
(
errors
.
containsKey
(
"ioerror"
)
||
!
identityStore
.
containsDomainCertificate
(
"RSA"
))
{
identityStore
.
addSelfSignedDomainCertificate
(
"RSA"
);
}
// Save new certificates into the key store
sslConfig
.
saveStores
();
identityStore
.
persist
();
// Log the event
webManager
.
logEvent
(
"generated SSL self-signed certs"
,
null
);
response
.
sendRedirect
(
"security-keystore.jsp?connecti
vityType="
+
connectivity
Type
);
response
.
sendRedirect
(
"security-keystore.jsp?connecti
onType="
+
connection
Type
);
return
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
errors
.
put
(
"generate"
,
e
.
getMessage
());
}
}
/*
if
(
importReply
)
{
String
reply
=
ParamUtils
.
getParameter
(
request
,
"reply"
);
if
(
alias
!=
null
&&
reply
!=
null
&&
reply
.
trim
().
length
()
>
0
)
{
...
...
@@ -124,7 +117,7 @@
sslConfig
.
saveStores
();
// Log the event
webManager
.
logEvent
(
"imported SSL certificate with alias "
+
alias
,
null
);
response
.
sendRedirect
(
"security-keystore.jsp?connecti
vityType="
+
connectivity
Type
);
response
.
sendRedirect
(
"security-keystore.jsp?connecti
onType="
+
connection
Type
);
return
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
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