Move keypair source out of source folder
This allows us to use `git clean` without risking to loose keypair, since it is typically .gitignored and not included in the Git repository. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
76124075fc
commit
46495773c2
8
Makefile
8
Makefile
@ -19,6 +19,7 @@ Clean ::
|
|||||||
# Folder creation
|
# Folder creation
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
"$(APPDATA)\Updater" \
|
||||||
"$(KEY_DIR)" :
|
"$(KEY_DIR)" :
|
||||||
if not exist $@ md $@
|
if not exist $@ md $@
|
||||||
|
|
||||||
@ -28,20 +29,21 @@ Clean ::
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
GenRSAKeypair :: \
|
GenRSAKeypair :: \
|
||||||
|
"$(APPDATA)\Updater" \
|
||||||
"$(KEY_DIR)" \
|
"$(KEY_DIR)" \
|
||||||
"$(KEY_DIR)\UpdaterKeyPrivate.bin" \
|
"$(KEY_DIR)\UpdaterKeyPrivate.bin" \
|
||||||
"$(KEY_DIR)\UpdaterKeyPublic.bin"
|
"$(KEY_DIR)\UpdaterKeyPublic.bin"
|
||||||
|
|
||||||
"$(KEY_DIR)\UpdaterKeypair.txt" :
|
"$(APPDATA)\Updater\Keypair.txt" :
|
||||||
openssl.exe genrsa -out $@ 4096
|
openssl.exe genrsa -out $@ 4096
|
||||||
|
|
||||||
"$(KEY_DIR)\UpdaterKeyPrivate.bin" : "$(KEY_DIR)\UpdaterKeypair.txt"
|
"$(KEY_DIR)\UpdaterKeyPrivate.bin" : "$(APPDATA)\Updater\Keypair.txt"
|
||||||
if exist $@ del /f /q $@
|
if exist $@ del /f /q $@
|
||||||
if exist "$(@:"=).tmp" del /f /q "$(@:"=).tmp"
|
if exist "$(@:"=).tmp" del /f /q "$(@:"=).tmp"
|
||||||
openssl.exe rsa -in $** -inform PEM -outform DER -out "$(@:"=).tmp"
|
openssl.exe rsa -in $** -inform PEM -outform DER -out "$(@:"=).tmp"
|
||||||
move /y "$(@:"=).tmp" $@ > NUL
|
move /y "$(@:"=).tmp" $@ > NUL
|
||||||
|
|
||||||
"$(KEY_DIR)\UpdaterKeyPublic.bin" : "$(KEY_DIR)\UpdaterKeypair.txt"
|
"$(KEY_DIR)\UpdaterKeyPublic.bin" : "$(APPDATA)\Updater\Keypair.txt"
|
||||||
if exist $@ del /f /q $@
|
if exist $@ del /f /q $@
|
||||||
if exist "$(@:"=).tmp" del /f /q "$(@:"=).tmp"
|
if exist "$(@:"=).tmp" del /f /q "$(@:"=).tmp"
|
||||||
openssl.exe rsa -in $** -inform PEM -outform DER -out "$(@:"=).tmp" -pubout
|
openssl.exe rsa -in $** -inform PEM -outform DER -out "$(@:"=).tmp" -pubout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user