File: certgeneration.py

package info (click to toggle)
python-pysaml2 4.5.0-4%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 27,664 kB
  • sloc: xml: 229,124; python: 61,007; makefile: 160; sh: 107
file content (20 lines) | stat: -rw-r--r-- 473 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from saml2.cert import OpenSSLWrapper

__author__ = 'haho0032'


cert_info_ca = {
    "cn": "localhost.ca",
    "country_code": "se",
    "state": "ac",
    "city": "umea",
    "organization": "ITS Umea University",
    "organization_unit": "DIRG"
}

osw = OpenSSLWrapper()

ca_cert, ca_key = osw.create_certificate(cert_info_ca, request=False, write_to_file=True,
                                                cert_dir="./")