bundles/wireguard: add netdev and network files, add iptables rules
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
e2490df48e
commit
58ca3fa9ae
8 changed files with 168 additions and 8 deletions
|
@ -1,11 +1,12 @@
|
|||
import base64
|
||||
from nacl.public import PrivateKey
|
||||
from nacl.encoding import Base64Encoder
|
||||
from bundlewrap.utils import Fault
|
||||
|
||||
def gen_privkey(identifier):
|
||||
def gen_privkey(repo, identifier):
|
||||
return repo.vault.random_bytes_as_base64_for(identifier)
|
||||
|
||||
def get_pubkey_from_privkey(identifier, privkey):
|
||||
def get_pubkey_from_privkey(repo, identifier, privkey):
|
||||
# FIXME this assumes the privkey is always a base64 encoded string
|
||||
def derive_pubkey():
|
||||
pub_key = PrivateKey(base64.b64decode(str(privkey))).public_key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue