"Fossies" - the Fresh Open Source Software Archive

Member "salt-3002.2/tests/integration/files/file/base/x509/proper_cert_comparison.sls" (18 Nov 2020, 1630 Bytes) of package /linux/misc/salt-3002.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {% set tmp_dir = pillar['tmp_dir'] %}
    2 
    3 {{ tmp_dir }}/pki:
    4   file.directory
    5 
    6 {{ tmp_dir  }}/pki/issued_certs:
    7   file.directory
    8 
    9 {{ tmp_dir  }}/pki/ca.key:
   10   x509.private_key_managed:
   11     # speed this up
   12     - bits: 1024
   13     - require:
   14       - file: {{ tmp_dir }}/pki
   15 
   16 {{ tmp_dir  }}/pki/ca.crt:
   17   x509.certificate_managed:
   18     - signing_private_key: {{ tmp_dir  }}/pki/ca.key
   19     - CN: ca.example.com
   20     - C: US
   21     - ST: Utah
   22     - L: Salt Lake City
   23     - basicConstraints: "critical CA:true"
   24     - keyUsage: "critical cRLSign, keyCertSign"
   25     - subjectKeyIdentifier: hash
   26     - authorityKeyIdentifier: keyid,issuer:always
   27     - days_valid: 3650
   28     - days_remaining: 0
   29     - backup: True
   30     - require:
   31       - file: {{ tmp_dir  }}/pki
   32       - x509: {{ tmp_dir  }}/pki/ca.key
   33 
   34 {{ tmp_dir  }}/pki/test.key:
   35   x509.private_key_managed:
   36     # speed this up
   37     - bits: 1024
   38     - backup: True
   39 
   40 test_crt:
   41   x509.certificate_managed:
   42     - name: {{ tmp_dir  }}/pki/test.crt
   43     - ca_server: minion
   44     - signing_policy: ca_policy
   45     - public_key: {{ tmp_dir  }}/pki/test.key
   46     - CN: minion
   47     - days_remaining: 30
   48     - backup: True
   49     - require:
   50         - x509: {{ tmp_dir  }}/pki/ca.crt
   51         - x509: {{ tmp_dir  }}/pki/test.key
   52 
   53 second_test_crt:
   54   x509.certificate_managed:
   55     - name: {{ tmp_dir  }}/pki/test.crt
   56     - ca_server: minion
   57     - signing_policy: ca_policy
   58     - public_key: {{ tmp_dir  }}/pki/test.key
   59     - CN: minion
   60     - days_remaining: 30
   61     - backup: True
   62     - require:
   63         - x509: {{ tmp_dir  }}/pki/ca.crt
   64         - x509: {{ tmp_dir  }}/pki/test.key
   65         - x509: {{ tmp_dir  }}/pki/test.crt