diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-06-05 15:42:25 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-06-29 09:32:24 +0200 |
commit | 25e08bc8a0037a3332d016f0491fff4da7b04b2c (patch) | |
tree | 7da26ac0e4c806eeb8ab2c273cee9bcf38f665f3 /apps/files_external/js/public_key.js | |
parent | 928b6a376eb6486f772e1f0304f9ac1166bbf4bb (diff) | |
download | nextcloud-server-25e08bc8a0037a3332d016f0491fff4da7b04b2c.tar.gz nextcloud-server-25e08bc8a0037a3332d016f0491fff4da7b04b2c.zip |
Allow 2048 and 4096 bit SFTP keys
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_external/js/public_key.js')
-rw-r--r-- | apps/files_external/js/public_key.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/apps/files_external/js/public_key.js b/apps/files_external/js/public_key.js index 5f9658381f0..669f1095735 100644 --- a/apps/files_external/js/public_key.js +++ b/apps/files_external/js/public_key.js @@ -22,6 +22,19 @@ $(document).ready(function() { }); function setupTableRow(tr, config) { + var selectList = document.createElement('select'); + selectList.id = 'keyLength'; + + var options = [1024, 2048, 4096]; + for (var i = 0; i < options.length; i++) { + var option = document.createElement('option'); + option.value = options[i]; + option.text = options[i]; + selectList.appendChild(option); + } + + $(config).append(selectList); + $(config).append($(document.createElement('input')) .addClass('button auth-param') .attr('type', 'button') @@ -32,8 +45,11 @@ $(document).ready(function() { function generateKeys(tr) { var config = $(tr).find('.configuration'); + var keyLength = config.find('#keyLength').val(); - $.post(OC.filePath('files_external', 'ajax', 'public_key.php'), {}, function(result) { + $.post(OC.filePath('files_external', 'ajax', 'public_key.php'), { + keyLength: keyLength + }, function(result) { if (result && result.status === 'success') { $(config).find('[data-parameter="public_key"]').val(result.data.public_key).keyup(); $(config).find('[data-parameter="private_key"]').val(result.data.private_key); |