Skip to content

Fix windows install issues #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 14, 2025
Merged

Fix windows install issues #120

merged 4 commits into from
May 14, 2025

Conversation

ljoy913
Copy link
Collaborator

@ljoy913 ljoy913 commented May 13, 2025

  • Fix x509 generation script
  • Fix broken symlink in setup script
  • Apply color-eyre fix from PR 117

@ljoy913 ljoy913 requested a review from christianpaquin May 13, 2025 21:20
@ljoy913 ljoy913 marked this pull request as ready for review May 13, 2025 21:20
@ljoy913 ljoy913 requested a review from zaverucha May 13, 2025 21:20
# generate self-signed root CA cert
openssl req -x509 -new -newkey ec:<(openssl ecparam -name secp521r1) -keyout "$tmpdir/root_CA.key" -out "$tmpdir/root_CA.crt" -nodes -subj "/CN=NY DMV Test Root CA" -days 3650 -config openssl_ca.cnf -extensions v3_ca -sha512
openssl ecparam -name secp521r1 -out tmpkey.pem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename tmpkey.pem $tmpdir/ecparamp521?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


# generate intermediate CA cert request
openssl req -new -newkey ec:<(openssl ecparam -name secp384r1) -keyout "$tmpdir/CA.key" -out "$tmpdir/CA.csr" -nodes -subj "/CN=NY DMV Test CA" -config openssl_ca.cnf -extensions v3_ca -sha384
openssl ecparam -name secp384r1 -out tmpkey.pem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename tmpkey.pem $tmpdir/ecparamp384?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


# root CA signs the CA cert request
openssl x509 -req -in "$tmpdir/CA.csr" -out "$tmpdir/CA.crt" -CA "$tmpdir/root_CA.crt" -CAkey "$tmpdir/root_CA.key" -CAcreateserial -days 1825 -extfile openssl_ca.cnf -extensions v3_ca -sha512

# generate signer cert request
openssl req -new -newkey ec:<(openssl ecparam -name prime256v1) -keyout "$tmpdir/issuer.key" -out "$tmpdir/issuer.csr" -nodes -subj "/CN=NY DMV Test Issuer" -config openssl_ca.cnf -extensions v3_signer -sha256
openssl ecparam -name prime256v1 -out tmpkey.pem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename tmpkey.pem $tmpdir/ecparamp256?

@@ -58,7 +58,7 @@ if [ -f "${CIRCOM_SRC_DIR}/circomlib" ]; then
rm -f "${CIRCOM_SRC_DIR}/circomlib"
if [[ "$OS" == "Windows_NT" || "$(uname -o 2>/dev/null)" == "Msys" ]]; then
echo "Creating Windows junction..."
cmd //c "mklink /J ${CIRCOM_SRC_DIR//\//\\}\\circomlib circuits\\circomlib"
cmd //c "mklink /J $(cygpath -wa "$CIRCOM_SRC_DIR"/circomlib) $(cygpath -wa "${ROOT_DIR}/circuits/circomlib")"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is cygpath always defined, even if you don't use a cygwin type system?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is cygpath always defined, even if you don't use a cygwin type system?

cygpath will only be used on windows/msys (gitbash) shells. If on ubuntu, the symlink will already be there and cygpath won't get called.

@ljoy913 ljoy913 merged commit 3753e64 into main May 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants