Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
0a41f178
Commit
0a41f178
authored
Jan 15, 2019
by
michael.simon
Browse files
validation works with rsa keys. ssh-ed25519 not working
parent
a2335f6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
bwreg-service/src/main/java/edu/kit/scc/webreg/ssh/OpenSshKeyDecoder.java
View file @
0a41f178
...
...
@@ -81,8 +81,8 @@ public class OpenSshKeyDecoder implements Serializable {
private
int
decodeInt
(
OpenSshPublicKey
key
)
{
byte
[]
bytes
=
key
.
getBytes
();
int
pos
=
key
.
getDecoderPos
();
int
header
=
((
bytes
[
pos
]
&
0xFF
)
<<
24
)
|
((
bytes
[
pos
]
&
0xFF
)
<<
16
)
|
((
bytes
[
pos
]
&
0xFF
)
<<
8
)
|
(
bytes
[
pos
]
&
0xFF
);
int
header
=
((
bytes
[
pos
]
&
0xFF
)
<<
24
)
|
((
bytes
[
pos
+
1
]
&
0xFF
)
<<
16
)
|
((
bytes
[
pos
+
2
]
&
0xFF
)
<<
8
)
|
(
bytes
[
pos
+
3
]
&
0xFF
);
key
.
increaseDecoderPos
(
4
);
return
header
;
}
...
...
bwreg-webapp/src/main/webapp/user/ssh-keys.xhtml
View file @
0a41f178
...
...
@@ -23,16 +23,34 @@
<ui:param
name=
"title"
value=
"#{messages.title}"
/>
<ui:define
name=
"content"
>
<h:form>
<h:form
id=
"form"
prependId=
"false"
>
<p:panel
header=
"#{messages.ssh_key_management}"
>
<div><p:messages
showDetail=
"true"
/></div>
<div
class=
"panel"
>
<div
class=
"panel"
>
#{messages.my_data_explanation}
</div>
<div
class=
"panel"
>
#{messages.data_from}:
<b>
#{userPropertiesBean.idpEntity.orgName}
</b></div>
<p:panelGrid
id=
"baseData"
columns=
"2"
>
<bw:outputText
label=
"#{messages.name}"
value=
"#{userPropertiesBean.user.surName}, #{userPropertiesBean.user.givenName}"
/>
<bw:outputText
label=
"#{messages.eppn}"
value=
"#{userPropertiesBean.user.eppn}"
/>
</p:panelGrid>
</div>
<p:panelGrid
id=
"baseData"
columns=
"2"
>
<h:outputText
value=
"#{messages.ssh_key}:"
/>
<h:panelGroup>
<ul>
<ui:repeat
var=
"key"
value=
"#{userSshKeyManagementBean.keyList.toArray()}"
>
<li><h:outputText
value=
"#{key.publicKey}"
/></li>
</ui:repeat>
</ul>
</h:panelGroup>
<h:outputText
value=
"#{messages.add_ssh_key}:"
/>
<p:inputTextarea
value=
"#{userSshKeyManagementBean.newKey}"
style=
"width: 600px; height: 100px;"
autoResize=
"false"
/>
</p:panelGrid>
<p:commandButton
id=
"add"
action=
"#{userSshKeyManagementBean.deployKey()}"
value=
"#{messages.add}"
update=
"@form"
/>
<p:ajaxStatus
id=
"ajaxStatusPanel"
style=
"display: inline-block; margin-left: 8px; vertical-align: baseline;"
>
<f:facet
name=
"start"
>
<h:graphicImage
value=
"#{resource['/img/ajax-loader.gif']}"
alt=
"#{messages.loading}"
/>
</f:facet>
<f:facet
name=
"complete"
>
<h:outputText
value=
""
/>
</f:facet>
</p:ajaxStatus>
</p:panel>
</h:form>
</ui:define>
</ui:composition>
...
...
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