Skip to content

corupted ovpn #960

@vb42ch

Description

@vb42ch

⚠️ Unless you are sure you find a bug with the script, please open a discussion instead of an issue!

Checklist

  • I read the README
  • I read the FAQ
  • I searched the issues
  • I searched the discussion
  • My issue is about the script, and not OpenVPN itself

Pease include as much details as possible in your issue:

  • Description of the issue
  • How to reproduce the issue
  • What did you expected should happen
  • Logs
  • Server/Client versions (OS, OpenVPN, etc)
  • Any context or information that could help

change
awk '/BEGIN/,/END/' "/etc/openvpn/easy-rsa/pki/issued/$CLIENT.crt"
to
awk '/---BEGIN/,/---END/' "/etc/openvpn/easy-rsa/pki/issued/$CLIENT.crt"

file.crt
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
de---HIDE---:04

---HIDE---
---HIDE---
---HIDE---
---HIDE---
---HIDE---
---HIDE---
---HIDE---

        X509v3 Extended Key Usage: 
            TLS Web Client Authentication
        X509v3 Key Usage: 
            Digital Signature
Signature Algorithm: ecdsa-with-SHA256
     30:45:---HIDE---:27:30:14:
     52:c1:2d:80:99:f0:c7:10:be:0d:50:af:78:5a:0d:b3:32

-----BEGIN CERTIFICATE-----
MIIBzjCCAXSgAwIBAg---HIDE---
---HIDE---
---HIDE---
---HIDE---
---HIDE---NVHQ8EBAMCB4AwCgYI
KoZIzj0EAwIDSAAwRQIhAIjid3MDESbmYENDCZi1egpf0K5I6MDaVqOXV/0GQGEL
AiAq4e+QmZq8XopsRd4nMBRSwS2AmfDHEL4NUK94Wg2zMg==
-----END CERTIFICATE-----

awk '/BEGIN/,/END/' 'file.crt'
-----BEGIN CERTIFICATE-----
MIIBzjCCAXSgAwIBAg---HIDE---
---HIDE---
---HIDE---
---HIDE---
---HIDE---NVHQ8EBAMCB4AwCgYI
KoZIzj0EAwIDSAAwRQIhAIjid3MDESbmYENDCZi1egpf0K5I6MDaVqOXV/0GQGEL

awk '/---BEGIN/,/---END/' 'file.crt'
-----BEGIN CERTIFICATE-----
MIIBzjCCAXSgAwIBAg---HIDE---
---HIDE---
---HIDE---
---HIDE---
---HIDE---NVHQ8EBAMCB4AwCgYI
KoZIzj0EAwIDSAAwRQIhAIjid3MDESbmYENDCZi1egpf0K5I6MDaVqOXV/0GQGEL
AiAq4e+QmZq8XopsRd4nMBRSwS2AmfDHEL4NUK94Wg2zMg==
-----END CERTIFICATE-----

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions