1
0
mirror of https://github.com/flant/ovpn-admin.git synced 2024-11-30 08:16:46 +02:00

Merge pull request #122 from flant/fix-crl-file-permissions

Fix crl.pem file permissions
This commit is contained in:
vitaliy-sn 2022-04-27 23:03:57 +03:00 committed by GitHub
commit 53119e17b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -523,7 +523,7 @@ func (openVPNPKI *OpenVPNPKI) updateFilesFromSecrets() (err error) {
func (openVPNPKI *OpenVPNPKI) updateCRLOnDisk() (err error) { func (openVPNPKI *OpenVPNPKI) updateCRLOnDisk() (err error) {
secret, err := openVPNPKI.secretGetByName(secretCRL) secret, err := openVPNPKI.secretGetByName(secretCRL)
crl := secret.Data["crl.pem"] crl := secret.Data["crl.pem"]
err = ioutil.WriteFile(fmt.Sprintf("%s/pki/crl.pem", *easyrsaDirPath), crl, 0600) err = ioutil.WriteFile(fmt.Sprintf("%s/pki/crl.pem", *easyrsaDirPath), crl, 0644)
if err != nil { if err != nil {
log.Errorf("error write crl.pem:%s", err.Error()) log.Errorf("error write crl.pem:%s", err.Error())
} }