'class':'btn',
'click':ui.createHandlerFn(this, function(section_id,ev) {
var prv = this.section.getUIElement(section_id,'private_key'),
+ pub = this.section.getUIElement(section_id,'public_key'),
map = this.map;
return generateKey().then(function(keypair){
prv.setValue(keypair.priv);
+ pub.setValue(keypair.pub);
map.save(null,true);
});
},section_id)
o.password=true;
o.validate=validatePrivateKey;
+ o=s.taboption('general',form.Value,'public_key',_('Public key'),_('The public key for your Yggdrasil node'));
+ o.optional=true;
+ o.validate=validatePublicKey;
+
s.taboption('general',cbiKeyPairGenerate,'_gen_server_keypair',' ');
o=s.taboption('advanced',form.Value,'mtu',_('MTU'),_('A default MTU of 65535 is set by Yggdrasil. It is recomended to utilize the default.'));
case "$2" in
generateKeyPair)
json_load "$(yggdrasil -genconf -json)"
- json_get_vars PublicKey PrivateKey
+ json_get_vars PrivateKey
json_cleanup
json_init
json_add_object "keys"
json_add_string "priv" "$PrivateKey"
- json_add_string "pub" "$PublicKey"
+ json_add_string "pub" "${PrivateKey:64}"
json_close_object
json_dump
;;