aboutsummaryrefslogtreecommitdiffstats
path: root/settings/templates/certificates.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-12-22 17:42:28 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-12 12:50:59 +0100
commitc15cab7ed6bf2d3ce9009ca09c7c5f33b252860f (patch)
tree08d3aefd146ce159b23073958f2fb7e96ace4143 /settings/templates/certificates.php
parent0c0829fbc73ce10ea1a951989c20973b6b5faa16 (diff)
downloadnextcloud-server-c15cab7ed6bf2d3ce9009ca09c7c5f33b252860f.tar.gz
nextcloud-server-c15cab7ed6bf2d3ce9009ca09c7c5f33b252860f.zip
Allow admins to add system wide root certificates
Diffstat (limited to 'settings/templates/certificates.php')
-rw-r--r--settings/templates/certificates.php44
1 files changed, 44 insertions, 0 deletions
diff --git a/settings/templates/certificates.php b/settings/templates/certificates.php
new file mode 100644
index 00000000000..c1ccdcaef95
--- /dev/null
+++ b/settings/templates/certificates.php
@@ -0,0 +1,44 @@
+<div class="section">
+ <h2><?php p($l->t('SSL Root Certificates')); ?></h2>
+ <table id="sslCertificate" class="grid" data-type="<?php p($_['type']); ?>">
+ <thead>
+ <tr>
+ <th><?php p($l->t('Common Name')); ?></th>
+ <th><?php p($l->t('Valid until')); ?></th>
+ <th><?php p($l->t('Issued By')); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($_['certs'] as $rootCert): /**@var \OCP\ICertificate $rootCert */ ?>
+ <tr class="<?php echo ($rootCert->isExpired()) ? 'expired' : 'valid' ?>"
+ data-name="<?php p($rootCert->getName()) ?>">
+ <td class="rootCert"
+ title="<?php p($rootCert->getOrganization()) ?>">
+ <?php p($rootCert->getCommonName()) ?>
+ </td>
+ <td title="<?php p($l->t('Valid until %s', $l->l('date', $rootCert->getExpireDate()))) ?>">
+ <?php echo $l->l('date', $rootCert->getExpireDate()) ?>
+ </td>
+ <td title="<?php p($rootCert->getIssuerOrganization()) ?>">
+ <?php p($rootCert->getIssuerName()) ?>
+ </td>
+ <td <?php if ($rootCert != ''): ?>class="remove"
+ <?php else: ?>style="visibility:hidden;"
+ <?php endif; ?>><img alt="<?php p($l->t('Delete')); ?>"
+ title="<?php p($l->t('Delete')); ?>"
+ class="svg action"
+ src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>"/>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <form class="uploadButton" method="post"
+ action="<?php p($_['urlGenerator']->linkToRoute($_['uploadRoute'])); ?>"
+ target="certUploadFrame">
+ <label for="rootcert_import" class="inlineblock button"
+ id="rootcert_import_button"><?php p($l->t('Import root certificate')); ?></label>
+ <input type="file" id="rootcert_import" name="rootcert_import"
+ class="hiddenuploadfield">
+ </form>
+</div>