Skip to content

Commit

Permalink
Add Custom Fields to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1ck3r committed Dec 15, 2020
1 parent 091b853 commit 53a8826
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/get_cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ def main():
request.user_principal_names = ["e1@venafi.example.com", "e2@venafi.example.com"]
# Specify ordering certificates in chain. Root can be "first" or "last". By default it last. You also can
# specify "ignore" to ignore chain (supported only for Platform).
# To set Custom Fields for the certificate, specify an array of CustomField objects as name-value pairs
#request.custom_fields = [
# CustomField(name="Cost Center", value="ABC123"),
# CustomField(name="Environment", value="Production"),
# CustomField(name="Environment", value="Staging")
#]

# configure key type, RSA example
# request.key_type = KeyType(KeyType.RSA, 4096)
Expand Down
6 changes: 6 additions & 0 deletions examples/get_cert27.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ def main():
request.ip_addresses = [u"127.0.0.1", u"192.168.1.1"]
# Specify ordering certificates in chain. Root can be "first" or "last". By default it last. You also can
# specify "ignore" to ignore chain (supported only for Platform).
# To set Custom Fields for the certificate, specify an array of CustomField objects as name-value pairs
#request.custom_fields = [
# CustomField(name="Cost Center", value="ABC123"),
# CustomField(name="Environment", value="Production"),
# CustomField(name="Environment", value="Staging")
#]

# Update certificate request from zone
zone_config = conn.read_zone_conf(zone)
Expand Down
6 changes: 6 additions & 0 deletions examples/get_cert_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ def main():
request.user_principal_names = [u"e1@venafi.example.com", u"e2@venafi.example.com"]
# Specify ordering certificates in chain. Root can be "first" or "last". By default its last. You also can
# specify "ignore" to ignore chain (supported only for Platform).
# To set Custom Fields for the certificate, specify an array of CustomField objects as name-value pairs
#request.custom_fields = [
# CustomField(name="Cost Center", value="ABC123"),
# CustomField(name="Environment", value="Production"),
# CustomField(name="Environment", value="Staging")
#]

# configure key type, RSA example
request.key_type = KeyType(KeyType.RSA, 2048)
Expand Down

0 comments on commit 53a8826

Please sign in to comment.