update zero process to secureZero
This commit is contained in:
		
							parent
							
								
									e7734281c3
								
							
						
					
					
						commit
						6229644bca
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -284,7 +284,9 @@ fn getSigningKey(allocator: std.mem.Allocator, signing_date: []const u8, config: | |||
|     , .{ signing_date, config.region, config.service }); | ||||
|     var secret = try std.fmt.allocPrint(allocator, "AWS4{s}", .{config.credentials.secret_key}); | ||||
|     defer { | ||||
|         for (secret) |_, i| secret[i] = 0; // zero our copy of secret | ||||
|         // secureZero avoids compiler optimizations that may say | ||||
|         // "WTF are you doing this thing? Looks like nothing to me. It's silly and we will remove it" | ||||
|         std.crypto.utils.secureZero(u8, secret); // zero our copy of secret | ||||
|         allocator.free(secret); | ||||
|     } | ||||
|     // log.debug("secret: {s}", .{secret}); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue