diff options
Diffstat (limited to 'embeddable-dll-service/main.go')
-rw-r--r-- | embeddable-dll-service/main.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/embeddable-dll-service/main.go b/embeddable-dll-service/main.go index df63034e..f313ae7f 100644 --- a/embeddable-dll-service/main.go +++ b/embeddable-dll-service/main.go @@ -1,23 +1,22 @@ /* SPDX-License-Identifier: MIT * - * Copyright (C) 2019-2021 WireGuard LLC. All Rights Reserved. + * Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved. */ 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[:]) |