|  |  | @ -349,6 +349,8 @@ module Submissions | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |           pdf.sign(io, write_options: { validate: false, incremental: false }, **sign_params) |  |  |  |           pdf.sign(io, write_options: { validate: false, incremental: false }, **sign_params) | 
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         maybe_enable_ltv(io, sign_params) | 
			
		
	
		
		
			
				
					
					|  |  |  |       else |  |  |  |       else | 
			
		
	
		
		
			
				
					
					|  |  |  |         begin |  |  |  |         begin | 
			
		
	
		
		
			
				
					
					|  |  |  |           pdf.write(io, incremental: true, validate: false) |  |  |  |           pdf.write(io, incremental: true, validate: false) | 
			
		
	
	
		
		
			
				
					|  |  | @ -358,10 +360,9 @@ module Submissions | 
			
		
	
		
		
			
				
					
					|  |  |  |           pdf.write(io, incremental: false, validate: false) |  |  |  |           pdf.write(io, incremental: false, validate: false) | 
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |       end |  |  |  |       end | 
			
		
	
		
		
			
				
					
					|  |  |  |       # rubocop:enable Metrics |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       ActiveStorage::Attachment.new( |  |  |  |       ActiveStorage::Attachment.new( | 
			
		
	
		
		
			
				
					
					|  |  |  |         blob: ActiveStorage::Blob.create_and_upload!(io: StringIO.new(io.string), filename: "#{name}.pdf"), |  |  |  |         blob: ActiveStorage::Blob.create_and_upload!(io: io.tap(&:rewind), filename: "#{name}.pdf"), | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         metadata: { original_uuid: uuid, |  |  |  |         metadata: { original_uuid: uuid, | 
			
		
	
		
		
			
				
					
					|  |  |  |                     analyzed: true, |  |  |  |                     analyzed: true, | 
			
		
	
		
		
			
				
					
					|  |  |  |                     sha256: Base64.urlsafe_encode64(Digest::SHA256.digest(io.string)) }, |  |  |  |                     sha256: Base64.urlsafe_encode64(Digest::SHA256.digest(io.string)) }, | 
			
		
	
	
		
		
			
				
					|  |  | @ -369,6 +370,11 @@ module Submissions | 
			
		
	
		
		
			
				
					
					|  |  |  |         record: submitter |  |  |  |         record: submitter | 
			
		
	
		
		
			
				
					
					|  |  |  |       ) |  |  |  |       ) | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     # rubocop:enable Metrics | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     def maybe_enable_ltv(io, _sign_params) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       io | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     def build_signing_params(pkcs, tsa_url) |  |  |  |     def build_signing_params(pkcs, tsa_url) | 
			
		
	
		
		
			
				
					
					|  |  |  |       params = { |  |  |  |       params = { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |