From 168f79ed172acedb1dac0786839cf60fa9295011 Mon Sep 17 00:00:00 2001 From: Jesse Peterson Date: Thu, 25 Mar 2021 13:19:44 -0700 Subject: [PATCH] Renaming module to v2 --- challenge/challenge.go | 4 ++-- challenge/challenge_bolt_test.go | 7 ++++--- client/client.go | 4 ++-- cmd/scepclient/csr.go | 2 +- cmd/scepclient/scepclient.go | 5 +++-- cmd/scepserver/scepserver.go | 13 +++++++------ csrverifier/csrverifier.go | 4 ++-- depot/bolt/depot.go | 3 ++- depot/signer.go | 4 ++-- go.mod | 2 +- scep/scep.go | 6 +++--- scep/scep_test.go | 4 ++-- server/csrsigner.go | 2 +- server/csrsigner_test.go | 2 +- server/service.go | 2 +- server/service_bolt_test.go | 11 ++++++----- server/transport_test.go | 6 +++--- 17 files changed, 43 insertions(+), 38 deletions(-) diff --git a/challenge/challenge.go b/challenge/challenge.go index ca884dd..2a0049b 100644 --- a/challenge/challenge.go +++ b/challenge/challenge.go @@ -5,8 +5,8 @@ import ( "crypto/x509" "errors" - "github.com/micromdm/scep/scep" - scepserver "github.com/micromdm/scep/server" + "github.com/micromdm/scep/v2/scep" + scepserver "github.com/micromdm/scep/v2/server" ) // Store is a dynamic challenge password cache. diff --git a/challenge/challenge_bolt_test.go b/challenge/challenge_bolt_test.go index 32aecca..003acbd 100644 --- a/challenge/challenge_bolt_test.go +++ b/challenge/challenge_bolt_test.go @@ -5,10 +5,11 @@ import ( "os" "testing" + challengestore "github.com/micromdm/scep/v2/challenge/bolt" + "github.com/micromdm/scep/v2/scep" + scepserver "github.com/micromdm/scep/v2/server" + "github.com/boltdb/bolt" - challengestore "github.com/micromdm/scep/challenge/bolt" - "github.com/micromdm/scep/scep" - scepserver "github.com/micromdm/scep/server" ) func TestDynamicChallenge(t *testing.T) { diff --git a/client/client.go b/client/client.go index af2081f..eee82ff 100644 --- a/client/client.go +++ b/client/client.go @@ -1,10 +1,10 @@ package scepclient import ( + scepserver "github.com/micromdm/scep/v2/server" + "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" - - "github.com/micromdm/scep/server" ) // Client is a SCEP Client diff --git a/cmd/scepclient/csr.go b/cmd/scepclient/csr.go index 62664d2..99ac5b7 100644 --- a/cmd/scepclient/csr.go +++ b/cmd/scepclient/csr.go @@ -10,7 +10,7 @@ import ( "io/ioutil" "os" - "github.com/micromdm/scep/cryptoutil/x509util" + "github.com/micromdm/scep/v2/cryptoutil/x509util" ) const ( diff --git a/cmd/scepclient/scepclient.go b/cmd/scepclient/scepclient.go index b26139b..3827241 100644 --- a/cmd/scepclient/scepclient.go +++ b/cmd/scepclient/scepclient.go @@ -15,10 +15,11 @@ import ( "strings" "time" + scepclient "github.com/micromdm/scep/v2/client" + "github.com/micromdm/scep/v2/scep" + "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" - scepclient "github.com/micromdm/scep/client" - "github.com/micromdm/scep/scep" "github.com/pkg/errors" ) diff --git a/cmd/scepserver/scepserver.go b/cmd/scepserver/scepserver.go index 7ae5a83..8f1e9bf 100644 --- a/cmd/scepserver/scepserver.go +++ b/cmd/scepserver/scepserver.go @@ -17,14 +17,15 @@ import ( "syscall" "time" + "github.com/micromdm/scep/v2/cryptoutil" + "github.com/micromdm/scep/v2/csrverifier" + executablecsrverifier "github.com/micromdm/scep/v2/csrverifier/executable" + scepdepot "github.com/micromdm/scep/v2/depot" + "github.com/micromdm/scep/v2/depot/file" + scepserver "github.com/micromdm/scep/v2/server" + "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" - "github.com/micromdm/scep/cryptoutil" - "github.com/micromdm/scep/csrverifier" - executablecsrverifier "github.com/micromdm/scep/csrverifier/executable" - scepdepot "github.com/micromdm/scep/depot" - "github.com/micromdm/scep/depot/file" - scepserver "github.com/micromdm/scep/server" ) // version info diff --git a/csrverifier/csrverifier.go b/csrverifier/csrverifier.go index c859e28..bfc350b 100644 --- a/csrverifier/csrverifier.go +++ b/csrverifier/csrverifier.go @@ -5,8 +5,8 @@ import ( "crypto/x509" "errors" - "github.com/micromdm/scep/scep" - scepserver "github.com/micromdm/scep/server" + "github.com/micromdm/scep/v2/scep" + scepserver "github.com/micromdm/scep/v2/server" ) // CSRVerifier verifies the raw decrypted CSR. diff --git a/depot/bolt/depot.go b/depot/bolt/depot.go index 15ee441..9951474 100644 --- a/depot/bolt/depot.go +++ b/depot/bolt/depot.go @@ -11,8 +11,9 @@ import ( "math/big" "time" + "github.com/micromdm/scep/v2/cryptoutil" + "github.com/boltdb/bolt" - "github.com/micromdm/scep/cryptoutil" ) // Depot implements a SCEP certifiacte store using boltdb. diff --git a/depot/signer.go b/depot/signer.go index 635c63b..6015798 100644 --- a/depot/signer.go +++ b/depot/signer.go @@ -5,8 +5,8 @@ import ( "crypto/x509" "time" - "github.com/micromdm/scep/cryptoutil" - "github.com/micromdm/scep/scep" + "github.com/micromdm/scep/v2/cryptoutil" + "github.com/micromdm/scep/v2/scep" ) // Signer signs x509 certificates and stores them in a Depot diff --git a/go.mod b/go.mod index 9587d17..e1999cb 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/micromdm/scep +module github.com/micromdm/scep/v2 go 1.16 diff --git a/scep/scep.go b/scep/scep.go index 8015b75..2c82453 100644 --- a/scep/scep.go +++ b/scep/scep.go @@ -12,13 +12,13 @@ import ( "encoding/asn1" "encoding/base64" + "github.com/micromdm/scep/v2/cryptoutil" + "github.com/micromdm/scep/v2/cryptoutil/x509util" + "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" - "github.com/micromdm/scep/cryptoutil" "github.com/pkg/errors" "go.mozilla.org/pkcs7" - - "github.com/micromdm/scep/cryptoutil/x509util" ) // errors diff --git a/scep/scep_test.go b/scep/scep_test.go index 36076c8..fbe13ae 100644 --- a/scep/scep_test.go +++ b/scep/scep_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/micromdm/scep/cryptoutil" - "github.com/micromdm/scep/scep" + "github.com/micromdm/scep/v2/cryptoutil" + "github.com/micromdm/scep/v2/scep" ) func testParsePKIMessage(t *testing.T, data []byte) *scep.PKIMessage { diff --git a/server/csrsigner.go b/server/csrsigner.go index e85f6fe..604776f 100644 --- a/server/csrsigner.go +++ b/server/csrsigner.go @@ -5,7 +5,7 @@ import ( "crypto/x509" "errors" - "github.com/micromdm/scep/scep" + "github.com/micromdm/scep/v2/scep" ) // CSRSigner is a handler for CSR signing by the CA/RA diff --git a/server/csrsigner_test.go b/server/csrsigner_test.go index cbbef18..b4c17bf 100644 --- a/server/csrsigner_test.go +++ b/server/csrsigner_test.go @@ -3,7 +3,7 @@ package scepserver import ( "testing" - "github.com/micromdm/scep/scep" + "github.com/micromdm/scep/v2/scep" ) func TestChallengeMiddleware(t *testing.T) { diff --git a/server/service.go b/server/service.go index e390ea5..58ef85e 100644 --- a/server/service.go +++ b/server/service.go @@ -6,7 +6,7 @@ import ( "crypto/x509" "errors" - "github.com/micromdm/scep/scep" + "github.com/micromdm/scep/v2/scep" "github.com/go-kit/kit/log" ) diff --git a/server/service_bolt_test.go b/server/service_bolt_test.go index 3684038..9bd40b0 100644 --- a/server/service_bolt_test.go +++ b/server/service_bolt_test.go @@ -14,12 +14,13 @@ import ( "testing" "time" + challengestore "github.com/micromdm/scep/v2/challenge/bolt" + scepdepot "github.com/micromdm/scep/v2/depot" + boltdepot "github.com/micromdm/scep/v2/depot/bolt" + "github.com/micromdm/scep/v2/scep" + scepserver "github.com/micromdm/scep/v2/server" + "github.com/boltdb/bolt" - challengestore "github.com/micromdm/scep/challenge/bolt" - scepdepot "github.com/micromdm/scep/depot" - boltdepot "github.com/micromdm/scep/depot/bolt" - "github.com/micromdm/scep/scep" - scepserver "github.com/micromdm/scep/server" ) func TestCaCert(t *testing.T) { diff --git a/server/transport_test.go b/server/transport_test.go index 3cf026c..ccaaadf 100644 --- a/server/transport_test.go +++ b/server/transport_test.go @@ -12,9 +12,9 @@ import ( "strings" "testing" - "github.com/micromdm/scep/depot" - filedepot "github.com/micromdm/scep/depot/file" - scepserver "github.com/micromdm/scep/server" + "github.com/micromdm/scep/v2/depot" + filedepot "github.com/micromdm/scep/v2/depot/file" + scepserver "github.com/micromdm/scep/v2/server" kitlog "github.com/go-kit/kit/log" )