Git Product home page Git Product logo

Comments (5)

BorisWilhelms avatar BorisWilhelms commented on June 30, 2024

Thank you for your message.

Microsoft support referred me to your script in-fact...
Hahaha, I don't if I like this or not...

Overall, I am currently not running Ubuntu, but Arch Linux. So I need to setup a VM to test this. I currently have limited time to spend, but will see if I can do something the next days.

Regarding Chromium and Brave, please check the paths in common.sh if they match your system.

from create-dotnet-devcert.

BorisWilhelms avatar BorisWilhelms commented on June 30, 2024

I actually tested it right now, and I am not able to reproduce this issue.

Could you please try the script from the branch 12-cert-not-trusted.

If the issue still persists, please paste the OpenSSL Version (openssl version) and the output of the script.

from create-dotnet-devcert.

athoma13 avatar athoma13 commented on June 30, 2024

Hi Boris,

Thank you for your time....
Tried and getting same behaviour....
Am I right to assume that after running your script that running an openssl verify on the cert (as above) should work?

Anyhow, here's the output of openssl version

OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

from create-dotnet-devcert.

BorisWilhelms avatar BorisWilhelms commented on June 30, 2024

Yes, openssl verify should work, and it does that for me in my Ubuntu VM. Your openssl version also matches mine, so I am not sure what the issue is.

Please pull the latest version of the script in this branch, run with -d arguments (e.g. ./ubuntu-create-dotnet-devcert.sh -d) and copy & paste the output here.

from create-dotnet-devcert.

amthejohnson avatar amthejohnson commented on June 30, 2024

I am having the same problem as @athoma13 when I run openssl verify. Below is the result when I run the script with -d:

+ DEPENDENCIES=dotnet certutil openssl
+ check_command dotnet
+ echo Checking if dotnet exists
Checking if dotnet exists
+ command -v dotnet
+ check_command certutil
+ echo Checking if certutil exists
Checking if certutil exists
+ command -v certutil
+ check_command openssl
+ echo Checking if openssl exists
Checking if openssl exists
+ command -v openssl
+ TMP_PATH=/var/tmp/localhost-dev-cert
+ [ ! -d /var/tmp/localhost-dev-cert ]
+ mkdir /var/tmp/localhost-dev-cert
+ KEYFILE=/var/tmp/localhost-dev-cert/dotnet-devcert.key
+ CRTFILE=/var/tmp/localhost-dev-cert/dotnet-devcert.crt
+ PFXFILE=/var/tmp/localhost-dev-cert/dotnet-devcert.pfx
+ NSSDB_PATHS=/home/tester/.pki/nssdb     /home/tester/snap/chromium/current/.pki/nssdb     /home/tester/snap/postman/current/.pki/nssdb     /home/tester/snap/brave/current/.pki/nssdb
+ CONF_PATH=/var/tmp/localhost-dev-cert/localhost.conf
+ cat
+ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /var/tmp/localhost-dev-cert/dotnet-devcert.key -out /var/tmp/localhost-dev-cert/dotnet-devcert.crt -config /var/tmp/localhost-dev-cert/localhost.conf --passout pass:
.........+......+.......+++++++++++++++++++++++++++++++++++++++*.+++++++++++++++++++++++++++++++++++++++*............+...........+.........+......+.+...+......+...........+....+..+....+........+...+...+.+...+...........+......+.+...+..+....+.....+..............................++++++
....+......+......+.....+.+..+......+++++++++++++++++++++++++++++++++++++++*.+.........+..........+......+......+..+.+.....+++++++++++++++++++++++++++++++++++++++*...........+...+..+..........+.....+.+..+.......+.....+.......+.....+.+..................+..+...+.+......+.........+.........+..+...+......+.+..+.+....................+.+......+..................+......+.....+...+...+...+....+........+..........+.....+...................+.........+.....+....+...+.........+......+.........+....................+...+.............+..................+..+............+.+.........+......+......+...+..+....+...........+...+......+.......+..+..........+..+....+............+...+..............+...+............+......+....+......+.....+.........+.+.........+...+............+..+.........+....+......+.........+........+....+...+...........+.+...+...+.........+......+...+..+.......+...+..+.....................+....+...+.....+.........+...+.............+...+.....+.........+.+.....+.......+...+......+......+.....+...+.+.........+.....+......+....+..+....+...+......+.....+.+...+...+.....+...+.........+......+.........+...+......................+..+......+...............+....+...+......+......+......+.....+.......+...+..............+..........+...+..+.+.....+.......+..+..................+..........+..+...+......+.+......+..+.+.........++++++
-----
+ openssl pkcs12 -export -out /var/tmp/localhost-dev-cert/dotnet-devcert.pfx -inkey /var/tmp/localhost-dev-cert/dotnet-devcert.key -in /var/tmp/localhost-dev-cert/dotnet-devcert.crt --passout pass:
+ [ -d /home/tester/.pki/nssdb ]
+ configure_nssdb /home/tester/.pki/nssdb
+ echo Configuring nssdb for /home/tester/.pki/nssdb
Configuring nssdb for /home/tester/.pki/nssdb
+ certutil -d sql:/home/tester/.pki/nssdb -D -n dotnet-devcert
+ certutil -d sql:/home/tester/.pki/nssdb -A -t CP,, -n dotnet-devcert -i /var/tmp/localhost-dev-cert/dotnet-devcert.crt
+ [ -d /home/tester/snap/chromium/current/.pki/nssdb ]
+ [ -d /home/tester/snap/postman/current/.pki/nssdb ]
+ [ -d /home/tester/snap/brave/current/.pki/nssdb ]
+ id -u
+ [ 1000 -ne 0 ]
+ SUDO=sudo
+ dotnet dev-certs https --clean --import /var/tmp/localhost-dev-cert/dotnet-devcert.pfx -p 
HTTPS development certificates successfully removed from the machine.
The certificate was successfully imported.
+ [ 0 = 1 ]
+ sudo rm /etc/ssl/certs/dotnet-devcert.pem
+ sudo cp /var/tmp/localhost-dev-cert/dotnet-devcert.crt /usr/local/share/ca-certificates
+ sudo update-ca-certificates
Updating certificates in /etc/ssl/certs...
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
+ cleanup
+ rm -R /var/tmp/localhost-dev-cert

from create-dotnet-devcert.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.