Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- set -x
- SB_CERTS_DIR=Secure_Boot_Certs
- trap "exit" INT
- if [ -d "$SB_CERTS_DIR" ]; then rm -fr "$SB_CERTS_DIR"; fi
- mkdir -p $SB_CERTS_DIR;cd $SB_CERTS_DIR
- function while_true {
- while true; do
- echo -e "\n # # # $* # # #\n"
- $*
- if [ $? == 0 ]
- then
- break
- else
- echo -e "\n # # # WRONG PASSWORD OR PASSWORDS DO NOT MUTCH! ! ! Try again! # # # \n"
- fi
- done
- }
- while_true "openssl genrsa -out PK-priv.key -aes-256-cfb -rand /var/log/messages 4096"
- #while_true "openssl genrsa -out KEK-priv.key -aes-256-cfb -rand /var/log/messages 4096"
- #while_true "openssl genrsa -out ISK-priv.key -aes-256-cfb -rand /var/log/messages 4096"
- while_true "openssl req -x509 -subj "/CN=PK pub auth/" -key PK-priv.key -out PK-cert.x509 -days 3650"
- #while_true "openssl req -x509 -subj "/CN=KEK pub auth/" -key KEK-priv.key -out KEK-cert.x509 -days 3650"
- #while_true "openssl req -x509 -subj "/CN=db auth/" -key ISK-priv.key -out ISK-cert.x509 -days 3650"
Advertisement
Add Comment
Please, Sign In to add comment