-
Notifications
You must be signed in to change notification settings - Fork 2.8k
luci-app-acme: support --cert-profile option #8187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ngehrsitz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tohojo There was no version to increment in the Makefile, is that not necessary here?
| o = s.taboption('advanced', form.Value, 'cert_profile', _('Certificate Profile')); | ||
| o.optional = true; | ||
| o.modalonly = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
order? It doesn't appear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This screenshot was captured without the change. My question was in general if you can control the order since the order here does not match the one in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Order of what? The order the elements appear in? Code order = appearance order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the code it is:
- Keytype
luci/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js
Lines 245 to 275 in 6efab68
o = s.taboption('advanced', form.ListValue, 'key_type', _('Key type'), _('Key size (and type) for the generated certificate.') ); o.value('rsa2048', _('RSA 2048 bits')); o.value('rsa3072', _('RSA 3072 bits')); o.value('rsa4096', _('RSA 4096 bits')); o.value('ec256', _('ECC 256 bits')); o.value('ec384', _('ECC 384 bits')); o.rmempty = false; o.optional = true; o.modalonly = true; o.cfgvalue = function(section_id) { let keylength = uci.get('acme', section_id, 'keylength'); if (keylength) { // migrate the old keylength to a new keytype switch (keylength) { case '2048': return 'rsa2048'; case '3072': return 'rsa3072'; case '4096': return 'rsa4096'; case 'ec-256': return 'ec256'; case 'ec-384': return 'ec384'; default: return ''; // bad value } } return this.super('cfgvalue', arguments); }; o.write = function(section_id, value) { // remove old keylength uci.unset('acme', section_id, 'keylength'); uci.set('acme', section_id, 'key_type', value); }; - URL
luci/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js
Lines 277 to 284 in 6efab68
o = s.taboption('advanced', form.Value, "acme_server", _("ACME server URL"), _('Use a custom CA instead of Let\'s Encrypt.') + ' ' + _('Custom ACME server directory URL.') + '<br />' + '<a href="https://github.com/acmesh-official/acme.sh/wiki/Server" target="_blank">' + _('See more') + '</a>' + '<br />' + _('Default') + ' <code>letsencrypt</code>' ); o.placeholder = "https://api.buypass.com/acme/directory"; o.optional = true; o.modalonly = true; - Staging
luci/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js
Lines 286 to 294 in 6efab68
o = s.taboption('advanced', form.Flag, 'staging', _('Use staging server'), _( 'Get certificate from the Letsencrypt staging server ' + '(use for testing; the certificate won\'t be valid).' ) ); o.depends('acme_server', ''); o.optional = true; o.modalonly = true; - Days
luci/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js
Lines 296 to 300 in 6efab68
o = s.taboption('advanced', form.Value, 'days', _('Days until renewal')); o.optional = true; o.placeholder = 'acme.sh default (60 days)'; o.datatype = 'uinteger'; o.modalonly = true;
But in the Screenshot it´s
- Staging
- Keytype
- URL
- Days
Thus not the order it is defined in...
This comment has been minimized.
This comment has been minimized.
This makes the new --cert-profile option from openwrt/packages#28237 available in Luci. Signed-off-by: Norman Gehrsitz <git@gehrsitz.eu>
bd5be0f to
c186253
Compare
Failed checksIssues marked with an ❌ are failing checks. Commit c186253
For more details, see the full job log. Something broken? Consider providing feedback. |

This makes the new
--cert-profileoption from openwrt/packages#28237 available using Luci.Signed-off-by: <my@email.address>row (viagit commit --signoff)<package name>: titlefirst line subject for packagesPKG_VERSIONin the Makefile