mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 18:01:23 -06:00
9a039acb22
Certificates are passed through the IPA XML-RPC and JSON as binary data in DER X509 format. Queries peformed against the LDAP server also return binary DER X509 format. In all cases the binary DER data is base-64 encoded. PEM is standard text format for certificates. It also uses base64 to encode the binary DER data, but had specific formatting requirements. The base64 data must be wrapped inside PEM delimiters and the base64 data must be line wrapped at 64 characters. Most external software which accepts certificates as input will only accept DER or PEM format (e.g. openssl & NSS). Although base64 is closely related to PEM it is not PEM unless the PEM delimters are present and the base64 data is line wrapped at 64 characters. We already convert binary DER certificates which have been passed as base64 in other parts of the IPA code. However this conversion has not been available in the web UI. When the web UI presented certificates it did so by filling a dialog box with a single line of base64 data. A user could not copy this data and use it as input to openssl or NSS for example. We resolve this problem by introducing new javascript functions in certificate.js. IPA.cert.pem_cert_format(text) will examine the text input and if it's already in PEM format just return it unmodified, otherwise it will line wrap the base64 data and add the PEM delimiters. Thus it is safe to call on either a previously formated PEM cert or a binary DER cert encoded as base64. This applies to pem_csr_format() as well for CSR's. Because pem_cert_format() is safe to call on either format the web UI will see the use of the flag add_pem_delimiters was eliminated except in the one case where the IPA.cert.download_dialog() was being abused to display PKCS12 binary data (pkcs12 is neither a cert nor a cert request). Because of the abuse of the cert.download_dialog() for pkcs12 it was necessary to retain the flag which in effect said "do not treat the data as PEM". Modify the CSR (Certificate Signing Request) dialog box to accept a PEM formatted CSR. Remove the artifical PEM delimiters above and below the dialog box which were used to suggest the input needed to be sans the delimiters. The dialog box continues to accept bare base64 thus allowing either text format. Also note this solves the display of certificate data in the UI without touching anything existing code in the server or command line, thus it's isolated. |
||
---|---|---|
.. | ||
test | ||
aci.js | ||
add-icon.png | ||
add.js | ||
arrow_collapsed.png | ||
arrow_expanded.png | ||
association.js | ||
automount.js | ||
background-center.png | ||
background-left.png | ||
background-right.png | ||
caution.png | ||
centered-bg.png | ||
certificate.js | ||
check.png | ||
combobox_open.png | ||
consume.png | ||
details.js | ||
develop.js | ||
dialog.js | ||
dns.js | ||
entitle.js | ||
entity.js | ||
facet-tab_off.png | ||
facet-tab_on.png | ||
favicon.ico | ||
firefox-icon.png | ||
group.js | ||
hbac.js | ||
host.js | ||
hostgroup.js | ||
hover-tab.png | ||
ie-icon.png | ||
import.png | ||
index.html | ||
ipa.css | ||
ipa.js | ||
ipabanner.png | ||
ipalogo.png | ||
jquery-ui.css | ||
jquery-ui.js | ||
jquery.ba-bbq.js | ||
jquery.js | ||
jquery.ordered-map.js | ||
jsl.conf | ||
json2.js | ||
Mainnav-background.png | ||
Mainnav-offtab.png | ||
Mainnav-ontab.png | ||
Makefile.am | ||
modal-background.png | ||
nav-arrow.png | ||
navigation.js | ||
netgroup.js | ||
outer-bg.png | ||
overpass_bold-web.eot | ||
overpass_bold-web.svg | ||
overpass_bold-web.ttf | ||
overpass_bold-web.woff | ||
overpass_regular-web.eot | ||
overpass_regular-web.svg | ||
overpass_regular-web.ttf | ||
overpass_regular-web.woff | ||
panel-background.png | ||
policy.js | ||
register.png | ||
remove-icon.png | ||
reset-icon.png | ||
rule.js | ||
search-bg.png | ||
search-icon.png | ||
search.js | ||
serverconfig.js | ||
service.js | ||
spinner_header.gif | ||
spinner_small.gif | ||
Static-Background.png | ||
Subnav-background.png | ||
sudo.js | ||
top-bg.png | ||
ui-bg_flat_65_ffffff_40x100.png | ||
ui-bg_glass_40_111111_1x400.png | ||
ui-bg_glass_55_1c1c1c_1x400.png | ||
ui-bg_highlight-hard_40_aaaaaa_1x100.png | ||
ui-bg_highlight-hard_100_f9f9f9_1x100.png | ||
ui-bg_highlight-soft_50_aaaaaa_1x100.png | ||
ui-bg_inset-hard_45_cd0a0a_1x100.png | ||
ui-bg_inset-hard_55_ffeb80_1x100.png | ||
ui-bg_loop_8_333333_21x21.png | ||
ui-icons_4ca300_256x240.png | ||
ui-icons_222222_256x240.png | ||
ui-icons_bbbbbb_256x240.png | ||
ui-icons_ededed_256x240.png | ||
ui-icons_ffcf29_256x240.png | ||
ui-icons_ffffff_256x240.png | ||
update-icon.png | ||
user.js | ||
webui.js | ||
widget.js |