mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-26 06:03:15 -05:00
Added SSH RSA PEM key support, #4002
This commit is contained in:
parent
c1d253f299
commit
4e9daa4286
@ -4834,7 +4834,9 @@
|
||||
if (ok == true) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var validkey = ((e.target.result.indexOf('-----BEGIN OPENSSH PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END OPENSSH PRIVATE KEY-----') >= 0));
|
||||
var validkey =
|
||||
((e.target.result.indexOf('-----BEGIN OPENSSH PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END OPENSSH PRIVATE KEY-----') >= 0)) ||
|
||||
((e.target.result.indexOf('-----BEGIN RSA PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END RSA PRIVATE KEY-----') >= 0));
|
||||
QE('idx_dlgOkButton', validkey);
|
||||
}
|
||||
reader.readAsText(Q('dp2key').files[0]);
|
||||
@ -4872,7 +4874,9 @@
|
||||
if (ok == true) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var validkey = ((e.target.result.indexOf('-----BEGIN OPENSSH PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END OPENSSH PRIVATE KEY-----') >= 0));
|
||||
var validkey =
|
||||
((e.target.result.indexOf('-----BEGIN OPENSSH PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END OPENSSH PRIVATE KEY-----') >= 0)) ||
|
||||
((e.target.result.indexOf('-----BEGIN RSA PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END RSA PRIVATE KEY-----') >= 0));
|
||||
QE('idx_dlgOkButton', validkey);
|
||||
QS('d2badkey')['color'] = validkey ? '#000' : '#F00';
|
||||
}
|
||||
|
@ -9805,7 +9805,9 @@
|
||||
if (ok == true) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var validkey = ((e.target.result.indexOf('-----BEGIN OPENSSH PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END OPENSSH PRIVATE KEY-----') >= 0));
|
||||
var validkey =
|
||||
((e.target.result.indexOf('-----BEGIN OPENSSH PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END OPENSSH PRIVATE KEY-----') >= 0)) ||
|
||||
((e.target.result.indexOf('-----BEGIN RSA PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END RSA PRIVATE KEY-----') >= 0));
|
||||
QE('idx_dlgOkButton', validkey);
|
||||
QS('d2badkey')['color'] = validkey?'#000':'#F00';
|
||||
}
|
||||
|
@ -145,7 +145,9 @@
|
||||
if (ok == true) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var validkey = ((e.target.result.indexOf('-----BEGIN OPENSSH PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END OPENSSH PRIVATE KEY-----') >= 0));
|
||||
var validkey =
|
||||
((e.target.result.indexOf('-----BEGIN OPENSSH PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END OPENSSH PRIVATE KEY-----') >= 0)) ||
|
||||
((e.target.result.indexOf('-----BEGIN RSA PRIVATE KEY-----') >= 0) && (e.target.result.indexOf('-----END RSA PRIVATE KEY-----') >= 0));
|
||||
QE('idx_dlgOkButton', validkey);
|
||||
QS('d2badkey')['color'] = validkey ? '#000' : '#F00';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user