• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2# Copyright 2023 The Chromium Authors
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5"""Single certificate chain for a serverAuth which does not contain the
6issuer."""
7
8import sys
9sys.path += ['../..']
10
11import gencerts
12
13# Self-signed root certificate.
14root = gencerts.create_self_signed_root_certificate('Root')
15
16# Target certificate.
17target = gencerts.create_end_entity_certificate('Target', root)
18target.get_extensions().set_property('extendedKeyUsage', 'serverAuth')
19
20chain = [target]
21gencerts.write_chain(__doc__, chain, 'chain.pem')
22