This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include('/etc/mock/templates/centos-8.tpl') | |
config_opts['root'] = 'delorean-master-el8-x86_64' | |
config_opts['target_arch'] = 'x86_64' | |
config_opts['legal_host_arches'] = ('x86_64',) | |
# what a build in cbs installs when doing 'groupinstall build' | |
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz' | |
config_opts['yum.conf'] += """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config_opts['root'] = 'delorean-master-el7-x86_64' | |
config_opts['target_arch'] = 'x86_64' | |
config_opts['legal_host_arches'] = ('x86_64',) | |
# what a build in cbs installs when doing 'groupinstall build' | |
config_opts['chroot_setup_cmd'] = 'install bash buildsys-macros-el7 buildsys-tools bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make openstack-macros patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz' | |
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst | |
config_opts['releasever'] = '7' | |
config_opts['yum_install_command'] += ' --disablerepo=sclo*' | |
config_opts['bootstrap_image'] = 'centos:7' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import base64 | |
import nacl.signing | |
import sys | |
# WIP unofficial entry points, available at: | |
# https://github.com/dciabrin/pynacl/tree/ec25519-lowlevel-api | |
from nacl.bindings.crypto_scalarmult import crypto_scalarmult_ed25519_base_noclamp | |
from nacl.bindings.crypto_core import crypto_core_ed25519_scalar_reduce, crypto_core_ed25519_scalar_mul, crypto_core_ed25519_scalar_add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS=$(shell pkg-config --cflags libsodium) | |
LDFLAGS=$(shell pkg-config --libs libsodium) | |
all: pk sign | |
%: %.c | |
gcc -g -O0 $(CFLAGS) $(LDFLAGS) $< -o $@ | |
clean: | |
rm -f pk sign *~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ed25519 | |
import base64 | |
import sys | |
# https://mariadb.org/history-of-mysql-mariadb-authentication-protocols/ | |
# https://mariadb.com/kb/en/library/connection/#client_ed25519-plugin | |
# mysql's use of ed25519: | |
# . a hash of the user password is used as the private key | |
# . public key (derived from private key) is what is stored in mariadb | |
# . the public key stored in the database is base64 encoded |