aboutsummaryrefslogtreecommitdiffstats
path: root/certs/update-certs.py
blob: 045daa64ae1dc8183bcbceb0a91d9014a7cbf336 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python2
# -*- coding: utf-8 -*-

import urllib2

COMMON_ROOT_CAS_URL = "https://mkcert.org/generate"
YANDEX_INTERNAL_CAS_URL = "https://crls.yandex.net/allCAs.pem"

def get_text(url):
    return urllib2.urlopen(url).read()

common_root_cas = get_text(COMMON_ROOT_CAS_URL)
yandex_internal_cas = get_text(YANDEX_INTERNAL_CAS_URL)
 
with open("cacert.pem", "wt") as target:
    target.write(common_root_cas)
    target.write(yandex_internal_cas)

with open("yandex_internal.pem", "wt") as target:
    target.write(yandex_internal_cas)