-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathssl
More file actions
46 lines (35 loc) · 1.37 KB
/
ssl
File metadata and controls
46 lines (35 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Create a self signed cert
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
...
$ openssl rsa -passin pass:x -in server.pass.key -out server.key
writing RSA key
$ rm server.pass.key
$ openssl req -new -key server.key -out server.csr
...
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:California
...
A challenge password []:
...
Generate SSL certificate
The self-signed SSL certificate is generated from the server.key private key and server.csr files.
//.......encrypt a cert key......
//not sure this works, encrypted to decrypted came out different than original
openssl rsa -des -in rehub.key -out rehub-enc.key
openssl rsa -in rehub-enc.key -out rehub-copy.key
//...........gpg...................
// genrate random password
gpg --gen-random -a 1 30
gpg --gen-random -a 1 60 | tr -dc A-Za-z0-9 | head -c40; echo
// encrypt and decrypt to ascii
gpg -c -a input.txt
gpg -o output.txt input.txt
//with a file as the key
gpg -c -a --batch --passphrase-file key.txt data.txt
gpg -o data2.txt --batch --passphrase-file key.txt data.txt.asc
//.......diceword fun................
// how many unique words in a book
tr -cs A-Za-z '\n' < alicehuck.txt | tr A-Z a-z | sort | uniq | wc -l
tr -cs A-Za-z '\n' < species.txt | tr A-Z a-z | sort | uniq | gshuf --random-source=/dev/random -n8
//.....wipe a file securly......
shred -vzn 3 file.txt