mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Make ssl api more idiomatic
This commit is contained in:
		
							parent
							
								
									f3f9864ae5
								
							
						
					
					
						commit
						878c70e0d9
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		|  | @ -50,8 +50,8 @@ module Kemal | |||
|           exit | ||||
|         end | ||||
|         ssl = Kemal::SSL.new | ||||
|         ssl.set_key_file @key_file.not_nil! | ||||
|         ssl.set_cert_file @cert_file.not_nil! | ||||
|         ssl.key_file = @key_file.not_nil! | ||||
|         ssl.cert_file =  @cert_file.not_nil! | ||||
|         Kemal.config.ssl = ssl.context | ||||
|       end | ||||
|     {% end %} | ||||
|  |  | |||
|  | @ -6,11 +6,11 @@ module Kemal | |||
|       @context = OpenSSL::SSL::Context::Server.new | ||||
|     end | ||||
| 
 | ||||
|     def set_key_file(key_file) | ||||
|     def key_file=(key_file) | ||||
|       @context.private_key = key_file | ||||
|     end | ||||
| 
 | ||||
|     def set_cert_file(cert_file) | ||||
|     def cert_file=(cert_file) | ||||
|       @context.certificate_chain = cert_file | ||||
|     end | ||||
|   end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue