mirror of
https://abf.rosa.ru/djam/kernel-keys.git
synced 2025-02-23 16:42:51 +00:00
Init (for import/kernel-5.3)
This commit is contained in:
commit
8cbe5dd96d
2 changed files with 31 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
x509*.genkey
|
||||||
|
*.pem
|
||||||
|
*.tar
|
||||||
|
sha*.list
|
||||||
|
md*.list
|
||||||
|
|
25
key.sh
Executable file
25
key.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Usage: EMAIL=vasya@pupkin.ru NUM=1 sh key.sh
|
||||||
|
set -efu
|
||||||
|
|
||||||
|
cat << EOF > "x509_${NUM}.genkey"
|
||||||
|
[ req ]
|
||||||
|
prompt = no
|
||||||
|
default_bits = 4096
|
||||||
|
default_md = sha512
|
||||||
|
days = 109500
|
||||||
|
default_keyfile = full_key${NUM}.pem
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
organizationName = ROSA Linux
|
||||||
|
commonName = Additional private kernel modules signing key #${NUM}
|
||||||
|
emailAddress = ${EMAIL}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
openssl req -new -nodes -utf8 -batch -x509 \
|
||||||
|
-config "x509_${NUM}.genkey" \
|
||||||
|
-outform PEM \
|
||||||
|
-out "full_key${NUM}.pem" \
|
||||||
|
-keyout "full_key${NUM}.pem"
|
||||||
|
|
||||||
|
sed -n '/^-----BEGIN CERTIFICATE-----$/,/^-----END CERTIFICATE-----$/p;/^-----END CERTIFICATE-----$/q' "full_key${NUM}.pem" > "public${NUM}.pem"
|
Loading…
Add table
Reference in a new issue