development:security:rsa
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
development:security:rsa [2024/08/16 06:53] – [1. Tạo key RSA] tungnt | development:security:rsa [2024/09/07 03:05] (current) – tungnt | ||
---|---|---|---|
Line 26: | Line 26: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | <code bash> | ||
+ | tungnt@MacBook-Pro-cua-Nguyen-2 2024 % openssl x509 -help | ||
+ | Usage: x509 [options] | ||
+ | |||
+ | General options: | ||
+ | | ||
+ | -in infile | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -key val Key for signing, and to include unless using -force_pubkey | ||
+ | | ||
+ | | ||
+ | -out outfile | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Certificate printing options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -ext val | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Certificate checking options: | ||
+ | | ||
+ | Exit 1 (failure) if so, 0 if not | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Certificate output options: | ||
+ | | ||
+ | | ||
+ | -days int Number of days until newly generated certificate expires - default 30 | ||
+ | | ||
+ | | ||
+ | | ||
+ | -subj val Alias for -set_subject | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Micro-CA options: | ||
+ | -CA infile | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Certificate trust output options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Random state options: | ||
+ | -rand val Load the given file(s) into the random number generator | ||
+ | | ||
+ | | ||
+ | |||
+ | Provider options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
====== 2. Sử dụng RSA từ postman ====== | ====== 2. Sử dụng RSA từ postman ====== | ||
Line 61: | Line 161: | ||
pm.environment.set(" | pm.environment.set(" | ||
</ | </ | ||
+ | |||
+ | ====== 3. Tra cứu chứng thư số ====== | ||
+ | |||
+ | <code bash> | ||
+ | % openssl x509 -in public_key.cer -text -noout | ||
+ | |||
+ | % openssl x509 -in public_key.cer -serial -noout | ||
+ | serial=5401120DBEDE6BADB78DB6895AEA45AA | ||
+ | |||
+ | % openssl x509 -in public_key.cer -dates -noout | ||
+ | notBefore=Aug 23 08:25:05 2023 GMT | ||
+ | notAfter=Aug 25 08:25:05 2026 GMT | ||
+ | |||
+ | % openssl rsa -noout -modulus -in tcb_refund.crt | openssl md5 | ||
+ | MD5(stdin)= ae4a16924cebaccc1b7a8240507930d0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | https:// | ||
+ | |||
+ | ====== 4. Tra cứu Remote Certificates ====== | ||
+ | |||
+ | <code bash> | ||
+ | openssl s_client -connect www.example.com: | ||
+ | </ |
development/security/rsa.1723791191.txt.gz · Last modified: 2024/08/16 06:53 by tungnt