Skip to content

Commit e5767d0

Browse files
committed
Fix certificate purpose
1 parent 9574fdf commit e5767d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

puppetserver-metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python3
22
#
3-
# Copyright (c) 2023, 2024, Stefan Möding
3+
# Copyright (c) 2023, 2024, 2025, Stefan Möding
44
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions are met:
@@ -487,7 +487,7 @@ def setup(self):
487487
raise CustomException('No usable client key found')
488488

489489
# Create SSL context for client authentication
490-
ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH, cafile=cacert)
490+
ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cafile=cacert)
491491
ctx.load_cert_chain(cert, key)
492492

493493
# TLSv1.3 would be nice but might not (yet) be available everywhere

0 commit comments

Comments
 (0)