Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
fcf365f3
Kaydet (Commit)
fcf365f3
authored
May 05, 2017
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
generate the certificate verification data as part of the build
Change-Id: I30186f76302e7666c833933b059931e8b1b7b78c
üst
a5204fe5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
21 deletions
+49
-21
CustomTarget_generated.mk
onlineupdate/CustomTarget_generated.mk
+30
-0
Executable_updater.mk
onlineupdate/Executable_updater.mk
+2
-0
Module_onlineupdate.mk
onlineupdate/Module_onlineupdate.mk
+1
-0
archivereader.cxx
onlineupdate/source/update/updater/archivereader.cxx
+2
-2
gen_cert_header.py
onlineupdate/source/update/updater/gen_cert_header.py
+14
-19
No files found.
onlineupdate/CustomTarget_generated.mk
0 → 100644
Dosyayı görüntüle @
fcf365f3
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CustomTarget_CustomTarget,onlineupdate/generated))
onlineupdate_INC := $(call gb_CustomTarget_get_workdir,onlineupdate/generated)/onlineupdate
$(onlineupdate_INC)/primaryCert.h : \
$(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,,1)
mkdir -p $(dir $@)
$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py "primaryCertData" /lo/users/moggi/NSSDBDir/master-daily.der > $(onlineupdate_INC)/primaryCert.h #"$(UPDATE_CONFIG)"
$(onlineupdate_INC)/secondaryCert.h : \
$(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,,1)
mkdir -p $(dir $@)
$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py "secondaryCertData" /lo/users/moggi/NSSDBDir/master-daily.der > $(onlineupdate_INC)/secondaryCert.h #"$(UPDATE_CONFIG)"
$(call gb_CustomTarget_get_target,onlineupdate/generated) : \
$(onlineupdate_INC)/primaryCert.h \
$(onlineupdate_INC)/secondaryCert.h \
# vim: set noet sw=4 ts=4:
onlineupdate/Executable_updater.mk
Dosyayı görüntüle @
fcf365f3
...
@@ -16,6 +16,8 @@ $(eval $(call gb_Executable_set_include,updater,\
...
@@ -16,6 +16,8 @@ $(eval $(call gb_Executable_set_include,updater,\
$$(INCLUDE) \
$$(INCLUDE) \
))
))
$(eval $(call gb_Executable_use_custom_headers,updater,onlineupdate/generated))
$(eval $(call gb_Executable_use_static_libraries,updater,\
$(eval $(call gb_Executable_use_static_libraries,updater,\
libmar \
libmar \
updatehelper \
updatehelper \
...
...
onlineupdate/Module_onlineupdate.mk
Dosyayı görüntüle @
fcf365f3
...
@@ -21,6 +21,7 @@ $(eval $(call gb_Module_add_targets,onlineupdate,\
...
@@ -21,6 +21,7 @@ $(eval $(call gb_Module_add_targets,onlineupdate,\
Executable_mar \
Executable_mar \
Executable_updater \
Executable_updater \
Executable_mbsdiff \
Executable_mbsdiff \
CustomTarget_generated \
))
))
endif
endif
...
...
onlineupdate/source/update/updater/archivereader.cxx
Dosyayı görüntüle @
fcf365f3
...
@@ -20,8 +20,8 @@
...
@@ -20,8 +20,8 @@
#ifdef TEST_UPDATER
#ifdef TEST_UPDATER
#include "../xpcshellCert.h"
#include "../xpcshellCert.h"
#else
#else
#include "primaryCert.h"
#include "
onlineupdate/
primaryCert.h"
#include "secondaryCert.h"
#include "
onlineupdate/
secondaryCert.h"
#endif
#endif
#endif
#endif
...
...
onlineupdate/source/update/updater/gen_cert_header.py
Dosyayı görüntüle @
fcf365f3
#!/usr/bin/env python
#!/usr/bin/env python
3
import
sys
import
sys
import
binascii
import
binascii
def
file_byte_generator
(
filename
,
block_size
=
512
):
def
file_byte_generator
(
filename
):
with
open
(
filename
,
"rb"
)
as
f
:
with
open
(
filename
,
"rb"
)
as
f
:
while
True
:
block
=
f
.
read
()
block
=
f
.
read
(
block_size
)
return
block
if
block
:
for
byte
in
block
:
yield
byte
else
:
break
def
create_header
(
array_name
,
in_filename
):
def
create_header
(
array_name
,
in_filename
):
hexified
=
[
"0x"
+
binascii
.
hexlify
(
byte
)
for
byte
in
file_byte_generator
(
in_filename
)]
hexified
=
[
"0x"
+
binascii
.
hexlify
(
bytes
([
inp
]))
.
decode
(
'ascii'
)
for
inp
in
file_byte_generator
(
in_filename
)]
print
(
"const uint8_t "
+
array_name
+
"[] = {"
)
print
(
"const uint8_t "
+
array_name
+
"[] = {"
)
print
(
", "
.
join
(
hexified
))
print
(
", "
.
join
(
hexified
))
print
(
"};"
)
print
(
"};"
)
return
0
return
0
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
if
len
(
sys
.
argv
)
<
3
:
if
len
(
sys
.
argv
)
<
3
:
print
(
'ERROR: usage: gen_cert_header.py array_name in_filename'
)
print
(
'ERROR: usage: gen_cert_header.py array_name in_filename'
)
sys
.
exit
(
1
);
sys
.
exit
(
1
);
sys
.
exit
(
create_header
(
sys
.
argv
[
1
],
sys
.
argv
[
2
]))
sys
.
exit
(
create_header
(
sys
.
argv
[
1
],
sys
.
argv
[
2
]))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment