diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-12-09 17:53:59 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-12-09 23:13:56 +0100 |
commit | 182247f5c830f93bfdb2a843a0ce3d394008c6d0 (patch) | |
tree | a2e3c0356c6c5ff2fcb8b572654d39e4735c4850 /embeddable-dll-service | |
parent | build: update to go 1.17.4 and drop upstreamed patches (diff) | |
download | wireguard-windows-182247f5c830f93bfdb2a843a0ce3d394008c6d0.tar.xz wireguard-windows-182247f5c830f93bfdb2a843a0ce3d394008c6d0.zip |
global: apply gofumpt
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'embeddable-dll-service')
-rw-r--r-- | embeddable-dll-service/main.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/embeddable-dll-service/main.go b/embeddable-dll-service/main.go index df63034e..7450d72d 100644 --- a/embeddable-dll-service/main.go +++ b/embeddable-dll-service/main.go @@ -7,17 +7,16 @@ package main import ( "C" + "crypto/rand" + "log" + "path/filepath" + "unsafe" "golang.org/x/crypto/curve25519" "golang.org/x/sys/windows" "golang.zx2c4.com/wireguard/windows/conf" "golang.zx2c4.com/wireguard/windows/tunnel" - - "crypto/rand" - "log" - "path/filepath" - "unsafe" ) //export WireGuardTunnelService @@ -33,7 +32,7 @@ func WireGuardTunnelService(confFile16 *uint16) bool { } //export WireGuardGenerateKeypair -func WireGuardGenerateKeypair(publicKey *byte, privateKey *byte) { +func WireGuardGenerateKeypair(publicKey, privateKey *byte) { publicKeyArray := (*[32]byte)(unsafe.Pointer(publicKey)) privateKeyArray := (*[32]byte)(unsafe.Pointer(privateKey)) n, err := rand.Read(privateKeyArray[:]) |