-
Notifications
You must be signed in to change notification settings - Fork 147
Allow use of paths with spaces on Windows #2
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
Open
mattock
wants to merge
1
commit into
OpenVPN:master
Choose a base branch
from
mattock:windows_quotes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem build a request for a cert that will be valid for ten years | ||
| openssl req -days 3650 -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl req -days 3650 -new -keyout "%KEY_DIR%\%1.key" -out "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem sign the cert request with our ca, creating a cert/key pair | ||
| openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl ca -days 3650 -out "%KEY_DIR%\%1.crt" -in "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem delete any .old files created in this process, to avoid future file creation errors | ||
| del /q %KEY_DIR%\*.old | ||
| del /q "%KEY_DIR%\*.old" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem build a cert authority valid for ten years, starting now | ||
| openssl req -days 3650 -nodes -new -x509 -keyout %KEY_DIR%\ca.key -out %KEY_DIR%\ca.crt -config %KEY_CONFIG% | ||
| openssl req -days 3650 -nodes -new -x509 -keyout "%KEY_DIR%\ca.key" -out "%KEY_DIR%\ca.crt" -config "%KEY_CONFIG%" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem build a dh file for the server side | ||
| openssl dhparam -out %KEY_DIR%/dh%KEY_SIZE%.pem %KEY_SIZE% | ||
| openssl dhparam -out "%KEY_DIR%/dh%KEY_SIZE%.pem" %KEY_SIZE% |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem build a request for a cert that will be valid for ten years | ||
| openssl req -days 3650 -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl req -days 3650 -new -keyout "%KEY_DIR%\%1.key" -out "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem sign the cert request with our ca, creating a cert/key pair | ||
| openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl ca -days 3650 -out "%KEY_DIR%\%1.crt" -in "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem delete any .old files created in this process, to avoid future file creation errors | ||
| del /q %KEY_DIR%\*.old | ||
| del /q "%KEY_DIR%\*.old" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem build a request for a cert that will be valid for ten years | ||
| openssl req -days 3650 -nodes -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl req -days 3650 -nodes -new -keyout "%KEY_DIR%\%1.key" -out "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem sign the cert request with our ca, creating a cert/key pair | ||
| openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl ca -days 3650 -out "%KEY_DIR%\%1.crt" -in "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem convert the key/cert and embed the ca cert into a pkcs12 file. | ||
| openssl pkcs12 -export -inkey %KEY_DIR%\%1.key -in %KEY_DIR%\%1.crt -certfile %KEY_DIR%\ca.crt -out %KEY_DIR%\%1.p12 | ||
| openssl pkcs12 -export -inkey "%KEY_DIR%\%1.key" -in "%KEY_DIR%\%1.crt" -certfile "%KEY_DIR%\ca.crt" -out "%KEY_DIR%\%1.p12" | ||
| rem delete any .old files created in this process, to avoid future file creation errors | ||
| del /q %KEY_DIR%\*.old | ||
| del /q "%KEY_DIR%\*.old" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem build a request for a cert that will be valid for ten years | ||
| openssl req -days 3650 -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl req -days 3650 -new -keyout "%KEY_DIR%\%1.key" -out "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem sign the cert request with our ca, creating a cert/key pair | ||
| openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -extensions server -config %KEY_CONFIG% | ||
| openssl ca -days 3650 -out "%KEY_DIR%\%1.crt" -in "%KEY_DIR%\%1.csr" -extensions server -config "%KEY_CONFIG%" | ||
| rem delete any .old files created in this process, to avoid future file creation errors | ||
| del /q %KEY_DIR%\*.old | ||
| del /q "%KEY_DIR%\*.old" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem build a request for a cert that will be valid for ten years | ||
| openssl req -days 3650 -nodes -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl req -days 3650 -nodes -new -keyout "%KEY_DIR%\%1.key" -out "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem sign the cert request with our ca, creating a cert/key pair | ||
| openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -extensions server -config %KEY_CONFIG% | ||
| openssl ca -days 3650 -out "%KEY_DIR%\%1.crt" -in "%KEY_DIR%\%1.csr" -extensions server -config "%KEY_CONFIG%" | ||
| rem delete any .old files created in this process, to avoid future file creation errors | ||
| del /q %KEY_DIR%\*.old | ||
| del /q "%KEY_DIR%\*.old" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem build a request for a cert that will be valid for ten years | ||
| openssl req -days 3650 -nodes -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl req -days 3650 -nodes -new -keyout "%KEY_DIR%\%1.key" -out "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem sign the cert request with our ca, creating a cert/key pair | ||
| openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% | ||
| openssl ca -days 3650 -out "%KEY_DIR%\%1.crt" -in "%KEY_DIR%\%1.csr" -config "%KEY_CONFIG%" | ||
| rem delete any .old files created in this process, to avoid future file creation errors | ||
| del /q %KEY_DIR%\*.old | ||
| del /q "%KEY_DIR%\*.old" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| @echo off | ||
| rem move to the HOME directory specified in VARS script | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem set a temporary KEY_DIR variable | ||
| set d=%KEY_DIR% | ||
| rem delete the KEY_DIR and any subdirs quietly | ||
| rmdir /s /q %d% | ||
| rmdir /s /q "%d%" | ||
| rem make a new KEY_DIR | ||
| mkdir %d% | ||
| mkdir "%d%" | ||
| rem copy in a fesh index file so we begin with an empty database | ||
| copy index.txt.start %d%\index.txt | ||
| copy index.txt.start "%d%\index.txt" | ||
| rem copy in a fresh serial file so we begin generating keys at index 01 | ||
| copy serial.start %d%\serial. | ||
| copy serial.start "%d%\serial." | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| @echo off | ||
| cd %HOME% | ||
| cd "%HOME%" | ||
| rem revoke cert | ||
| openssl ca -revoke %KEY_DIR%\%1.crt -config %KEY_CONFIG% | ||
| openssl ca -revoke "%KEY_DIR%\%1.crt" -config "%KEY_CONFIG%" | ||
| rem generate new crl | ||
| openssl ca -gencrl -out %KEY_DIR%\crl.pem -config %KEY_CONFIG% | ||
| openssl ca -gencrl -out "%KEY_DIR%\crl.pem" -config "%KEY_CONFIG%" | ||
| rem test revocation | ||
| rem first concatinate ca cert with newly generated crl | ||
| copy %KEY_DIR%\ca.crt+%KEY_DIR%\crl.pem %KEY_DIR%\revoke_test_file.pem | ||
| copy "%KEY_DIR%\ca.crt"+"%KEY_DIR%\crl.pem" "%KEY_DIR%\revoke_test_file.pem" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to this page the "+" operator concatenates files together. Is this the correct way to quote this command? |
||
| rem now verify the revocation | ||
| openssl verify -CAfile %KEY_DIR%\revoke_test_file.pem -crl_check %KEY_DIR%\%1.crt | ||
| openssl verify -CAfile "%KEY_DIR%\revoke_test_file.pem" -crl_check "%KEY_DIR%\%1.crt" | ||
| rem delete temporary test file | ||
| del /q %KEY_DIR%\revoke_test_file.pem | ||
| del /q "%KEY_DIR%\revoke_test_file.pem" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure what this line i supposed to do. Does it really just copy serial.start to serial.? What is the point of having the dot at the end of the filename?