You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ra...@apache.org on 2018/09/18 16:40:42 UTC

[trafficcontrol] branch master updated (9cf84c1 -> c4965c1)

This is an automated email from the ASF dual-hosted git repository.

rawlin pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git.


    from 9cf84c1  Added .sketch to rat-excludes
     new 6f70a87  Fix TO Go DS SSL key to also create latest version
     new c4965c1  Change TO DS SSL update to use riaksvc const

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go | 5 +++++
 traffic_ops/traffic_ops_golang/riaksvc/dsutil.go          | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)


[trafficcontrol] 01/02: Fix TO Go DS SSL key to also create latest version

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 6f70a8705c6ed23e83f7a9fd8e5ae6310d3057cf
Author: Robert Butts <ro...@apache.org>
AuthorDate: Mon Sep 17 15:18:30 2018 -0600

    Fix TO Go DS SSL key to also create latest version
    
    Fixes #2828
---
 traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go b/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
index 0efba68..0ab9916 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
@@ -51,6 +51,8 @@ func GenerateSSLKeys(w http.ResponseWriter, r *http.Request) {
 	api.WriteResp(w, r, "Successfully created ssl keys for "+*req.DeliveryService)
 }
 
+const DSSSLKeyVersionLatest = `latest`
+
 // generatePutRiakKeys generates a certificate, csr, and key from the given request, and insert it into the Riak key database.
 // The req MUST be validated, ensuring required fields exist.
 func generatePutRiakKeys(req tc.DeliveryServiceSSLKeysReq, tx *sql.Tx, cfg *config.Config) error {
@@ -78,5 +80,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 = DSSSLKeyVersionLatest
+	if err := riaksvc.PutDeliveryServiceSSLKeysObjTx(dsSSLKeys, tx, cfg.RiakAuthOptions); err != nil {
+		return errors.New("putting latest riak keys: " + err.Error())
+	}
 	return nil
 }


[trafficcontrol] 02/02: Change TO DS SSL update to use riaksvc const

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit c4965c1263d2bbdd8fe09905d4538ff539ec2445
Author: Robert Butts <ro...@apache.org>
AuthorDate: Mon Sep 17 16:39:24 2018 -0600

    Change TO DS SSL update to use riaksvc const
---
 traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go | 4 +---
 traffic_ops/traffic_ops_golang/riaksvc/dsutil.go          | 3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go b/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
index 0ab9916..d313608 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/sslkeys.go
@@ -51,8 +51,6 @@ func GenerateSSLKeys(w http.ResponseWriter, r *http.Request) {
 	api.WriteResp(w, r, "Successfully created ssl keys for "+*req.DeliveryService)
 }
 
-const DSSSLKeyVersionLatest = `latest`
-
 // generatePutRiakKeys generates a certificate, csr, and key from the given request, and insert it into the Riak key database.
 // The req MUST be validated, ensuring required fields exist.
 func generatePutRiakKeys(req tc.DeliveryServiceSSLKeysReq, tx *sql.Tx, cfg *config.Config) error {
@@ -81,7 +79,7 @@ func generatePutRiakKeys(req tc.DeliveryServiceSSLKeysReq, tx *sql.Tx, cfg *conf
 		return errors.New("putting riak keys: " + err.Error())
 	}
 
-	dsSSLKeys.Version = DSSSLKeyVersionLatest
+	dsSSLKeys.Version = riaksvc.DSSSLKeyVersionLatest
 	if err := riaksvc.PutDeliveryServiceSSLKeysObjTx(dsSSLKeys, tx, cfg.RiakAuthOptions); err != nil {
 		return errors.New("putting latest riak keys: " + err.Error())
 	}
diff --git a/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go b/traffic_ops/traffic_ops_golang/riaksvc/dsutil.go
index 2742ae5..24f3d57 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 {