aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-10 12:26:01 +0700
committerShulhan <ms@kilabit.info>2023-11-10 12:53:36 +0700
commit378facb96e877ed275a59d974ee9b69e06120a53 (patch)
treefe930c06d3d306c872c15bf36d74a24dbb35a993 /pkg
parentd7ae2721b8268b1e2880656504f41d4ae94c902b (diff)
downloadeasypki-378facb96e877ed275a59d974ee9b69e06120a53.tar.xz
all: fork of unmaintained "github.com/google/easypki"
Changes, * Add Go module * replace "github.com/codegangsta/cli" with "github.com/urfave/cli" * Changes import path to this repository using the following command, $ find . -type f -name "*.go" \ | xargs sed -i "s#github.com/google/easypki#git.sr.ht/~shulhan/easypki#g" * Reformat all files using goimports * Remove reference to Travis and CodeCov
Diffstat (limited to 'pkg')
-rw-r--r--pkg/easypki/easypki.go4
-rw-r--r--pkg/easypki/easypki_test.go5
-rw-r--r--pkg/store/bolt.go5
-rw-r--r--pkg/store/bolt_test.go5
-rw-r--r--pkg/store/local.go25
-rw-r--r--pkg/store/local_test.go2
-rw-r--r--pkg/store/store.go2
7 files changed, 22 insertions, 26 deletions
diff --git a/pkg/easypki/easypki.go b/pkg/easypki/easypki.go
index 84eb0d6..b428525 100644
--- a/pkg/easypki/easypki.go
+++ b/pkg/easypki/easypki.go
@@ -23,8 +23,8 @@ import (
"fmt"
"time"
- "github.com/google/easypki/pkg/certificate"
- "github.com/google/easypki/pkg/store"
+ "git.sr.ht/~shulhan/easypki/pkg/certificate"
+ "git.sr.ht/~shulhan/easypki/pkg/store"
)
const (
diff --git a/pkg/easypki/easypki_test.go b/pkg/easypki/easypki_test.go
index 77a5858..f73ae8e 100644
--- a/pkg/easypki/easypki_test.go
+++ b/pkg/easypki/easypki_test.go
@@ -20,13 +20,12 @@ import (
"io/ioutil"
"net"
"os"
+ "reflect"
"testing"
"time"
+ "git.sr.ht/~shulhan/easypki/pkg/store"
"github.com/boltdb/bolt"
- "github.com/google/easypki/pkg/store"
-
- "reflect"
)
func TestLocalE2E(t *testing.T) {
diff --git a/pkg/store/bolt.go b/pkg/store/bolt.go
index 4f4f5a9..710ba45 100644
--- a/pkg/store/bolt.go
+++ b/pkg/store/bolt.go
@@ -17,13 +17,12 @@ package store
import (
"crypto/x509/pkix"
"errors"
+ "fmt"
"math/big"
"time"
- "fmt"
-
+ "git.sr.ht/~shulhan/easypki/pkg/certificate"
"github.com/boltdb/bolt"
- "github.com/google/easypki/pkg/certificate"
)
var (
diff --git a/pkg/store/bolt_test.go b/pkg/store/bolt_test.go
index 6ae940d..d4acd7d 100644
--- a/pkg/store/bolt_test.go
+++ b/pkg/store/bolt_test.go
@@ -19,12 +19,11 @@ import (
"io/ioutil"
"math/big"
"os"
- "testing"
-
"reflect"
+ "testing"
+ "git.sr.ht/~shulhan/easypki/pkg/certificate"
"github.com/boltdb/bolt"
- "github.com/google/easypki/pkg/certificate"
)
func TestBolt(t *testing.T) {
diff --git a/pkg/store/local.go b/pkg/store/local.go
index 1895e83..58a2f5b 100644
--- a/pkg/store/local.go
+++ b/pkg/store/local.go
@@ -16,6 +16,7 @@ package store
import (
"bufio"
+ "crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
@@ -27,9 +28,7 @@ import (
"strings"
"time"
- "crypto/x509"
-
- "github.com/google/easypki/pkg/certificate"
+ "git.sr.ht/~shulhan/easypki/pkg/certificate"
)
// Predifined directory names.
@@ -317,16 +316,16 @@ func (l *Local) Revoked(caName string) ([]pkix.RevokedCertificate, error) {
// InitCADir creates the basic structure of a CA subdirectory.
//
-// |- crlnumber
-// |- index.txt
-// |- index.txt.attr
-// |- serial
-// |- certs/
-// |- ca.crt
-// |- name.crt
-// |- keys/
-// |- ca.key
-// |- name.key
+// |- crlnumber
+// |- index.txt
+// |- index.txt.attr
+// |- serial
+// |- certs/
+// |- ca.crt
+// |- name.crt
+// |- keys/
+// |- ca.key
+// |- name.key
func InitCADir(path string) error {
if _, err := os.Stat(path); err == nil {
return nil
diff --git a/pkg/store/local_test.go b/pkg/store/local_test.go
index 61543a8..a3e6f39 100644
--- a/pkg/store/local_test.go
+++ b/pkg/store/local_test.go
@@ -24,7 +24,7 @@ import (
"reflect"
"testing"
- "github.com/google/easypki/pkg/certificate"
+ "git.sr.ht/~shulhan/easypki/pkg/certificate"
)
var (
diff --git a/pkg/store/store.go b/pkg/store/store.go
index fc39945..b6cdf42 100644
--- a/pkg/store/store.go
+++ b/pkg/store/store.go
@@ -19,7 +19,7 @@ import (
"crypto/x509/pkix"
"math/big"
- "github.com/google/easypki/pkg/certificate"
+ "git.sr.ht/~shulhan/easypki/pkg/certificate"
)
// Store reprents a way to store a Certificate Authority.