Last active
December 7, 2021 09:02
-
-
Save yonixw/c6a798f651232c26f2e9f63718e5744c to your computer and use it in GitHub Desktop.
how to import pfx p7b into amazon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c:\OpenSSL-Win64\bin\openssl.exe pkcs12 -in ???.pfx -out private+cert.pem -nodes | |
c:\OpenSSL-Win64\bin\openssl.exe pkcs7 -text -out chain.pem -print_certs -in <PKCSfile>.p7b | |
show cert | |
c:\OpenSSL-Win64\bin\openssl.exe s_client -connect www.google.com:443 | |
for /F "delims=" %a in ('dir /b /s "*.pfx"') do echo %a | |
for /F "delims=" %a in ('dir /b /s "*.pfx"') do c:\OpenSSL-Win64\bin\openssl.exe pkcs12 -in %a -out %a_private+cert.pem -nodes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,sys | |
def destroy_password_file(password_filename): | |
lentext = os.stat(password_filename).st_size | |
zero_fill_line_length = 40 | |
zero_fill = ['0' * zero_fill_line_length | |
for _ | |
in range(lentext // zero_fill_line_length + 1)] | |
zero_fill = os.linesep.join(zero_fill) | |
with open(password_filename, 'w') as password_file: | |
password_file.write(zero_fill) | |
destroy_password_file(sys.argv[1]) | |
# OR | |
arr = os.listdir() | |
[destroy_password_file(x) for x in arr] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment