mirror of
				https://github.com/therootcompany/greenlock-express.js.git
				synced 2025-11-04 05:52:47 +00:00 
			
		
		
		
	add crl option
This commit is contained in:
		
							parent
							
								
									f884f5cc58
								
							
						
					
					
						commit
						d27452bb58
					
				@ -25,7 +25,7 @@ module.exports.create = function (opts) {
 | 
			
		||||
      return v;
 | 
			
		||||
    },'  '));
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  if (!opts.letsencrypt) { throw new Error("requires opts.letsencrypt to be a letsencrypt instance"); }
 | 
			
		||||
 | 
			
		||||
  if (!opts.lifetime) { opts.lifetime = 90 * 24 * 60 * 60 * 1000; }
 | 
			
		||||
@ -103,6 +103,7 @@ module.exports.create = function (opts) {
 | 
			
		||||
          key: certInfo.privkey || certInfo.key         // privkey.pem
 | 
			
		||||
        , cert: certInfo.fullchain || certInfo.cert     // fullchain.pem (cert.pem + '\n' + chain.pem)
 | 
			
		||||
        , ca: (opts.httpsOptions.ca ? opts.httpsOptions.ca + '\n' + certInfo.ca : certInfo.ca)
 | 
			
		||||
        , crl: opts.httpsOptions.crl
 | 
			
		||||
        });
 | 
			
		||||
      } catch(e) {
 | 
			
		||||
        console.warn("[Sanity Check Fail]: a weird object was passed back through le.fetch to lex.fetch");
 | 
			
		||||
@ -127,7 +128,7 @@ module.exports.create = function (opts) {
 | 
			
		||||
    if (opts.debug) {
 | 
			
		||||
      console.debug("[LEX] '" + hostname + "' is not registered, requesting approval");
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    if (!hostname) {
 | 
			
		||||
      sniCb(new Error('[registerCert] no hostname'));
 | 
			
		||||
      return;
 | 
			
		||||
@ -167,7 +168,7 @@ module.exports.create = function (opts) {
 | 
			
		||||
      sniCb(new Error('[sniCallback] [fetch] no hostname'));
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    opts.letsencrypt.fetch({ domains: [hostname] }, function (err, certInfo) {
 | 
			
		||||
      if (opts.debug) {
 | 
			
		||||
        console.debug("[LEX] fetch from disk result '" + hostname + "':");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user