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
97d2def3
Commit
97d2def3
authored
Apr 21, 2015
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-892: Applying feedback from admin panel testing of keystore management.
parent
e9d5cffe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
security-keystore.jsp
src/web/security-keystore.jsp
+7
-16
No files found.
src/web/security-keystore.jsp
View file @
97d2def3
...
...
@@ -29,7 +29,6 @@
boolean
generate
=
ParamUtils
.
getBooleanParameter
(
request
,
"generate"
);
boolean
delete
=
ParamUtils
.
getBooleanParameter
(
request
,
"delete"
);
boolean
importReply
=
ParamUtils
.
getBooleanParameter
(
request
,
"importReply"
);
String
type
=
ParamUtils
.
getParameter
(
request
,
"type"
);
String
alias
=
ParamUtils
.
getParameter
(
request
,
"alias"
);
Map
<
String
,
String
>
errors
=
new
HashMap
<
String
,
String
>
();
KeyStore
keyStore
=
null
;
...
...
@@ -71,17 +70,9 @@
}
}
if
(
delete
)
{
if
(
type
!=
null
&&
alias
!=
null
)
{
if
(
alias
!=
null
)
{
try
{
if
(
type
.
equals
(
"server"
))
{
CertificateManager
.
deleteCertificate
(
keyStore
,
alias
);
}
else
if
(
type
.
equals
(
"s2s"
))
{
CertificateManager
.
deleteCertificate
(
s2sTrustStore
,
alias
);
}
else
if
(
type
.
equals
(
"c2s"
))
{
CertificateManager
.
deleteCertificate
(
c2sTrustStore
,
alias
);
}
else
{
throw
new
Exception
(
"Unknown certificate type: "
+
type
);
}
SSLConfig
.
saveStores
();
// Log the event
webManager
.
logEvent
(
"deleted SSL cert with alias "
+
alias
,
null
);
...
...
@@ -97,7 +88,7 @@
String
reply
=
ParamUtils
.
getParameter
(
request
,
"reply"
);
if
(
alias
!=
null
&&
reply
!=
null
&&
reply
.
trim
().
length
()
>
0
)
{
try
{
CertificateManager
.
installReply
(
SSLConfig
.
getKeyStore
(),
SSLConfig
.
gets2sTrustStore
()
,
CertificateManager
.
installReply
(
keyStore
,
s2sTrustStore
,
SSLConfig
.
getKeyPassword
(),
alias
,
new
ByteArrayInputStream
(
reply
.
getBytes
()),
true
,
true
);
SSLConfig
.
saveStores
();
// Log the event
...
...
@@ -151,7 +142,7 @@
</c:forEach>
<%
if
(
keyStore
!=
null
)
{
if
(
keyStore
.
size
()
>
1
&&
!
CertificateManager
.
isRSACertificate
(
SSLConfig
.
getKeyStore
()
,
XMPPServer
.
getInstance
().
getServerInfo
().
getXMPPDomain
()))
{
if
(
keyStore
.
size
()
>
1
&&
!
CertificateManager
.
isRSACertificate
(
keyStore
,
XMPPServer
.
getInstance
().
getServerInfo
().
getXMPPDomain
()))
{
%>
<admin:infobox
type=
"warning"
><fmt:message
key=
"index.certificate-warning"
/></admin:infobox>
<%
}
else
if
(
keyStore
.
size
()
<
2
)
{
%>
...
...
@@ -294,7 +285,7 @@
<c:out
value=
"
${
certificate
.
publicKey
.
algorithm
}
"
/>
</td>
<td
width=
"1"
align=
"center"
>
<a
href=
"security-keystore.jsp?alias=${alias}&
type=server&
delete=true"
<a
href=
"security-keystore.jsp?alias=${alias}&delete=true"
title=
"
<fmt:message
key=
"global.click_delete"
/>
"
onclick=
"return confirm('
<fmt:message
key=
"ssl.certificates.confirm_delete"
/>
');"
><img
src=
"images/delete-16x16.gif"
width=
"16"
height=
"16"
border=
"0"
alt=
""
></a>
...
...
@@ -336,8 +327,8 @@
<%
if
(
offerUpdateIssuer
)
{
%>
<p>
<fmt:message
key=
"ssl.signing-request.offer-issuer-information"
>
<fmt:param
value=
"<
%= "
<a
href=
'ssl-signing-request.jsp'
>
"
%
>
"/>
<fmt:param
value=
"<
%= "
</a>
"
%
>
"/>
<fmt:param
value=
"<
a href='ssl-signing-request.jsp'
>"
/>
<fmt:param
value=
"<
/a
>"
/>
</fmt:message>
</p>
<%
}
%>
...
...
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