diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-03-12 14:45:25 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-03-13 10:14:21 +0100 |
commit | 7c10488ebaa41165094f5cf632938d91fcec7deb (patch) | |
tree | 13167af7ab65f3d476eea37ae83d8e8b8ce88d61 /recipes/ca-certificates.recipe | |
parent | 19832310fd591875b0ed4a98ec9f8ef1c4fa53e8 (diff) |
Include ca-certificates on Android and iOS
Diffstat (limited to 'recipes/ca-certificates.recipe')
-rw-r--r-- | recipes/ca-certificates.recipe | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes/ca-certificates.recipe b/recipes/ca-certificates.recipe new file mode 100644 index 00000000..63bcbcae --- /dev/null +++ b/recipes/ca-certificates.recipe @@ -0,0 +1,33 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python +import os +import shutil +from cerbero.utils import shell + +# Created with tools/certdata2pem on the Mozilla CA list +# https://mxr.mozilla.org/mozilla-central/source/security/nss/lib/ckfw/builtins/certdata.txt + +class Recipe(recipe.Recipe): + name = 'ca-certificates' + version = '0.1' + licenses = [License.MPLv2] + stype = SourceType.CUSTOM + btype = BuildType.CUSTOM + + files_etc = [ + 'etc/ssl/certs/ca-certificates.crt', + ] + + def install(self): + dst_dir = os.path.join(self.config.prefix, 'etc', 'ssl', 'certs') + if not os.path.exists(dst_dir): + os.makedirs(dst_dir) + src_dir = os.path.join(self.config.recipes_dir, 'ca-certificates') + for f in self.files_etc: + fname = os.path.basename(f) + s = os.path.join(src_dir, fname) + d = os.path.join(dst_dir, fname) + if os.path.isfile(s): + shutil.copy(s, d) + else: + shell.copy_dir(s, d) + |