rawlinp closed pull request #2829: Fix TO Go DS SSL key to also create latest
version
URL: https://github.com/apache/trafficcontrol/pull/2829
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
b/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
index 0efba6845..d31360884 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
@@ -78,5 +78,10 @@ func generatePutRiakKeys(req tc.DeliveryServiceSSLKeysReq,
tx *sql.Tx, cfg *conf
if err := riaksvc.PutDeliveryServiceSSLKeysObjTx(dsSSLKeys, tx,
cfg.RiakAuthOptions); err != nil {
return errors.New("putting riak keys: " + err.Error())
}
+
+ dsSSLKeys.Version = riaksvc.DSSSLKeyVersionLatest
+ if err := riaksvc.PutDeliveryServiceSSLKeysObjTx(dsSSLKeys, tx,
cfg.RiakAuthOptions); err != nil {
+ return errors.New("putting latest riak keys: " + err.Error())
+ }
return nil
}
diff --git a/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go
b/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go
index 2742ae576..24f3d57d1 100644
--- a/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go
+++ b/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go
@@ -32,7 +32,8 @@ import (
const DeliveryServiceSSLKeysBucket = "ssl"
const DNSSECKeysBucket = "dnssec"
-const DefaultDSSSLKeyVersion = "latest"
+const DSSSLKeyVersionLatest = "latest"
+const DefaultDSSSLKeyVersion = DSSSLKeyVersionLatest
const URLSigKeysBucket = "url_sig_keys"
func MakeDSSSLKeyKey(dsName, version string) string {
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services