Skip to content

Commit 73da31e

Browse files
committed
fix loading of payload in updateSslCrt/setSslCrt
The presence of '\r' followed by '\n' seems to block loading the payload. Further reading: haproxy/haproxy@d60c893 opnsense/plugins#4560
1 parent 777c8d2 commit 73da31e

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Added
1111
* New API command: setSslCrt
1212

13+
### Fixed
14+
* Fix loading of payload in updateSslCrt/setSslCrt
15+
1316
### Deprecated
1417
* Deprecate API command: updateSslCrt
1518

haproxy/cmds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,14 @@ class newSslCrt(Cmd):
261261

262262
class setSslCrt(Cmd):
263263
"""" Begin a transaction to upload the certificate into a slot in HAProxy’s memory """
264-
cmdTxt = "set ssl cert %(certfile)s <<\n%(payload)s\r\n"
264+
cmdTxt = "set ssl cert %(certfile)s <<\n%(payload)s\n"
265265
req_args = ['certfile', 'payload']
266266
helpTxt = "Replace a certificate file."
267267

268268

269269
class updateSslCrt(Cmd):
270270
"""" DEPRECATED. Begin a transaction to upload the certificate into a slot in HAProxy’s memory """
271-
cmdTxt = "set ssl cert %(certfile)s <<\n%(payload)s\r\n"
271+
cmdTxt = "set ssl cert %(certfile)s <<\n%(payload)s\n"
272272
req_args = ['certfile', 'payload']
273273
helpTxt = "DEPRECATED. Alias for setSslCrt. Kept for compatibility reasons."
274274

0 commit comments

Comments
 (0)