Project

General

Profile

Actions

Bug #10218

closed

Telegraf: Error creating the telegraf.ca file when you have more then one CA in pfSense

Added by Grimson Gretzleburg almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Category:
Telegraf
Target version:
-
Start date:
01/28/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
2.4.5
Affected Plus Version:
Affected Architecture:
All

Description

I'm running the 2.4.5-RC with Telegraf package 0.9_1 and found that Telegraf wouldn't start when I have more then one CA in pfSense.
After checking the created telegraf.ca I found that there is a missing newline after the first certificate, so it looked like this:

-----END CERTIFICATE----------BEGIN CERTIFICATE-----

which is invalid.

The fix is quite simple, look at line 67 in telegraf.inc and change it from

$ca_pem .= base64_decode($ca['crt']);

to

$ca_pem .= base64_decode($ca['crt'])."\n";

Actions #2

Updated by Jim Pingle almost 5 years ago

  • Status changed from New to Pull Request Review
Actions #3

Updated by Renato Botelho almost 5 years ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

Pull request has been merged. Thanks!

Actions #4

Updated by Viktor Gurov almost 5 years ago

  • Status changed from Feedback to Resolved

works as expected on pfSense 2.5.0.a.20200207.2007 and 2.4.5.r.20200206.1944
Telegraf 0.9_2

Actions

Also available in: Atom PDF