Guest User

Untitled

a guest
Oct 13th, 2020
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.98 KB | None | 0 0
  1. #!/bin/bash
  2. set -x
  3.  
  4. SB_CERTS_DIR=Secure_Boot_Certs
  5. trap "exit" INT
  6.  
  7. if [ -d "$SB_CERTS_DIR" ]; then rm -fr "$SB_CERTS_DIR"; fi
  8. mkdir -p $SB_CERTS_DIR;cd $SB_CERTS_DIR
  9.  
  10. function while_true {
  11. while true; do
  12. echo -e "\n  #   #   #      $*       #   #   #\n"
  13. $*
  14. if [ $? == 0 ]
  15. then
  16. break
  17. else
  18. echo -e "\n   #     #       #       WRONG PASSWORD OR PASSWORDS DO NOT MUTCH! ! ! Try again!    #   #   #       \n"
  19. fi
  20. done
  21. }
  22.  
  23. while_true "openssl genrsa -out PK-priv.key -aes-256-cfb -rand /var/log/messages 4096"
  24. #while_true "openssl genrsa -out KEK-priv.key -aes-256-cfb -rand /var/log/messages 4096"
  25. #while_true "openssl genrsa -out ISK-priv.key -aes-256-cfb -rand /var/log/messages 4096"
  26. while_true "openssl req -x509 -subj "/CN=PK pub auth/" -key PK-priv.key -out PK-cert.x509 -days 3650"
  27. #while_true "openssl req -x509 -subj "/CN=KEK pub auth/" -key KEK-priv.key -out KEK-cert.x509 -days 3650"
  28. #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