From b9ad279ad2d8d93dd501115a028783cf8fe7fcbd Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 19 Jan 2011 12:26:14 -0500 Subject: rename static to ui Directory rename --- install/ui/certificate.js | 785 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 785 insertions(+) create mode 100755 install/ui/certificate.js (limited to 'install/ui/certificate.js') diff --git a/install/ui/certificate.js b/install/ui/certificate.js new file mode 100755 index 00000000..b7e5a51d --- /dev/null +++ b/install/ui/certificate.js @@ -0,0 +1,785 @@ +/*jsl:import ipa.js */ + +/* Authors: + * Endi Sukma Dewata + * + * Copyright (C) 2010 Red Hat + * see file 'COPYING' for use and warranty information + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +var BEGIN_CERTIFICATE = '-----BEGIN CERTIFICATE-----'; +var END_CERTIFICATE = '-----END CERTIFICATE-----'; + +var BEGIN_CERTIFICATE_REQUEST = '-----BEGIN CERTIFICATE REQUEST-----'; +var END_CERTIFICATE_REQUEST = '-----END CERTIFICATE REQUEST-----'; + +var CRL_REASON = [ + 'Unspecified', + 'Key Compromise', + 'CA Compromise', + 'Affiliation Changed', + 'Superseded', + 'Cessation of Operation', + 'Certificate Hold', + null, + 'Remove from CRL', + 'Privilege Withdrawn', + 'AA Compromise' +]; + +var CERTIFICATE_STATUS_MISSING = 0; +var CERTIFICATE_STATUS_VALID = 1; +var CERTIFICATE_STATUS_REVOKED = 2; + +function certificate_parse_dn(dn) { + + var result = {}; + if (!dn) return result; + + // TODO: Use proper LDAP DN parser + var rdns = dn.split(','); + for (var i=0; i', { + 'title': that.title + }); + + var textarea = $('