Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. cd /home/vscode/.aspnet/https/
  4.  
  5. apt-get update \
  6. && apt-get install ca-certificates openssl \
  7. && rm -rf /var/cache/apt/* \
  8. && openssl pkcs12 -in aspnetapp.pfx -out localhost.pem -nokeys -nodes -passin pass:SecurePwdGoesHere \
  9. && openssl pkcs12 -in aspnetapp.pfx -out localhost.key -nocerts -nodes -passin pass:SecurePwdGoesHere \
  10. && openssl pkcs12 -export -out localhost-nopass.pfx -inkey localhost.key -in localhost.pem -passout pass: \
  11. && chmod 644 * \
  12. && chmod 600 *.pfx
  13.  
  14.  
  15. cp localhost.pem /usr/local/share/ca-certificates/localhost.crt
  16. cp localhost-nopass.pfx /root/.dotnet/corefx/cryptography/x509stores/my/
  17.  
  18. apt-get update \
  19. && apt-get install ca-certificates \
  20. && rm -rf /var/cache/apt/* \
  21. && update-ca-certificates 2>/dev/null \
  22. && ls /etc/ssl/certs/*localhost* \
  23. && echo 'cert imported correctly if listed above'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement