plugins: whitespace and lint cleanups

This commit is contained in:
Franco Fichtner
2019-09-11 07:55:57 +02:00
parent 5dafec8ff6
commit 11af5ad200
4 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -134,4 +134,4 @@ return!i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:
n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Ci(n,f+s);break;case"takeRight":f=Ui(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,o=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Ci(n,this.__takeCount__),!e||!u&&i==n&&l==n)return wr(t,this.__actions__);
e=[];n:for(;n--&&a<l;){for(o+=r,u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},An.prototype.at=To,An.prototype.chain=function(){return Ye(this)},An.prototype.commit=function(){return new On(this.value(),this.__chain__)},An.prototype.next=function(){this.__values__===T&&(this.__values__=mu(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){
for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,
wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this);
wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this);
@@ -214,9 +214,9 @@ _existingchallenge() {
_opns_check_auth() {
OPNs_Host="${OPNs_Host:-$(_readaccountconf_mutable OPNs_Host)}"
OPNs_Port="${OPNs_Port:-$(_readaccountconf_mutable OPNs_Port)}"
OPNs_Key="${OPNs_Key:-$(_readaccountconf_mutable OPNs_Key)}"
OPNs_Token="${OPNs_Token:-$(_readaccountconf_mutable OPNs_Token)}"
OPNs_Api_Insecure="${OPNs_Api_Insecure:-$(_readaccountconf_mutable OPNs_Api_Insecure)}"
OPNs_Key="${OPNs_Key:-$(_readaccountconf_mutable OPNs_Key)}"
OPNs_Token="${OPNs_Token:-$(_readaccountconf_mutable OPNs_Token)}"
OPNs_Api_Insecure="${OPNs_Api_Insecure:-$(_readaccountconf_mutable OPNs_Api_Insecure)}"
if [ -z "$OPNs_Host" ]; then
OPNs_Host="localhost"
@@ -18,4 +18,4 @@ fi
chown root:wheel ${ACME_BASE} ${ACME_BASE}/*
chmod 750 ${ACME_BASE} ${ACME_BASE}/*
exit 0
exit 0
+15 -15
View File
@@ -27,35 +27,35 @@
*/
const ABOUT = <<<TXT
This script implements a SFTP based certificate uploader that fully manages
This script implements a SFTP based certificate uploader that fully manages
identities and "known_hosts" inside a local configuration folder.
Primary purpose is to support the creation of automation tasks that deploy
certificates to other hosts via SFTP after their creation or renewal.
In addition to automations, all operations can also be triggered manually
Primary purpose is to support the creation of automation tasks that deploy
certificates to other hosts via SFTP after their creation or renewal.
In addition to automations, all operations can also be triggered manually
using simple CLI commands.
Care has been taken to implement this in a secure way. Authorization is only
possible via trusted public keys (identities) and restrictions are added to
the key output created for inclusion in the remote side's "authorized_keys".
This limits attack vectors that might arise form information leakage.
Identities & "known_hosts" are kept in "/var/etc/acme-client/sftp-config"
by default (see "config_path()"). Private info is owner accessible only.
by default (see "config_path()"). Private info is owner accessible only.
Implementation-wise, ssh/sftp tools are used via their CLI api. No attempts
are made to understand key and file formats more than necessary to reduce
maintenance efforts and not to break on system wide SSH setups like enabling
hashing of hostnames.
Since there is some complexity involved, the script has a rich commandline
api for testing and integration purposes. It also runs perfectly fine in a
Since there is some complexity involved, the script has a rich commandline
api for testing and integration purposes. It also runs perfectly fine in a
local development environment without the opnsense api in place (using
"--files=file,..." to specify files to upload directly).
See: EXAMPLES & actions_acmeclient.conf
TXT;
// Commands & help
@@ -93,7 +93,7 @@ const STATIC_OPTIONS = <<<TXT
TXT;
const EXAMPLES = <<<TXT
- Show the public key used to communicate with the SFTP server
- Show the public key used to communicate with the SFTP server
./upload_sftp.php --log --identity-type=ecdsa show-identity
- Test connectivity with host
@@ -104,7 +104,7 @@ const EXAMPLES = <<<TXT
- Upload cert to specific server
./upload_sftp.php --log --certificates=my.domain.com --host=sftpserver --user=name
- Upload all enabled certs to specific server
./upload_sftp.php --log --host=sftpserver --user=name
TXT;