mirror of
https://github.com/flant/ovpn-admin.git
synced 2026-02-04 01:10:22 -08:00
Compare commits
2 Commits
a6fc3294b6
...
fbee2c07dc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbee2c07dc | ||
|
|
10e961ca0f |
838
frontend/package-lock.json
generated
838
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -36,8 +36,8 @@
|
|||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"css-loader": "^6.5.1",
|
"css-loader": "^6.5.1",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"node-sass": "^7.0.1",
|
"node-sass": "^9.0.0",
|
||||||
"sass-loader": "^12.4.0",
|
"sass-loader": "^16.0.5",
|
||||||
"terser-webpack-plugin": "^5.3.0",
|
"terser-webpack-plugin": "^5.3.0",
|
||||||
"vue-loader": "^17.0.0",
|
"vue-loader": "^17.0.0",
|
||||||
"vue-template-compiler": "^2.6.14",
|
"vue-template-compiler": "^2.6.14",
|
||||||
|
|||||||
@ -32,7 +32,7 @@ const (
|
|||||||
privKeyFileName = "tls.key"
|
privKeyFileName = "tls.key"
|
||||||
)
|
)
|
||||||
|
|
||||||
//<year><month><day><hour><minute><second>Z
|
// <year><month><day><hour><minute><second>Z
|
||||||
const indexTxtDateFormat = "060102150405Z"
|
const indexTxtDateFormat = "060102150405Z"
|
||||||
|
|
||||||
var namespace = "default"
|
var namespace = "default"
|
||||||
@ -470,6 +470,11 @@ func (openVPNPKI *OpenVPNPKI) easyrsaRotate(commonName, newPassword string) (err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = openVPNPKI.transferRoutes(secret, commonName)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
err = openVPNPKI.indexTxtUpdate()
|
err = openVPNPKI.indexTxtUpdate()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -774,3 +779,16 @@ func (openVPNPKI *OpenVPNPKI) secretCheckExists(name string) (bool, string) {
|
|||||||
}
|
}
|
||||||
return true, secret.ResourceVersion
|
return true, secret.ResourceVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// transferRoutes transfers configured routes from revoked certs to a new one
|
||||||
|
func (openVPNPKI *OpenVPNPKI) transferRoutes(revokedSecret *v1.Secret, newNameCert string) error {
|
||||||
|
ccd, ok := revokedSecret.Data["ccd"]
|
||||||
|
if !ok || len(ccd) == 0 {
|
||||||
|
log.Infof("No CCD data found in secret %s", revokedSecret.Name)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
openVPNPKI.secretUpdateCcd(newNameCert, ccd)
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user