Skip to content

Commit

Permalink
update to new major version
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmturner committed Oct 30, 2017
1 parent a0dde5e commit f6e17ea
Show file tree
Hide file tree
Showing 102 changed files with 323 additions and 323 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

To get the package, execute:
```
go get gopkg.in/jcmturner/gokrb5.v1
go get gopkg.in/jcmturner/gokrb5.v2
```
To import this package, add the following line to your code:
```go
import "gopkg.in/jcmturner/gokrb5.v1/<sub package>"
import "gopkg.in/jcmturner/gokrb5.v2/<sub package>"

```

Expand Down Expand Up @@ -51,7 +51,7 @@ Currently the following is working/tested:
The gokrb5 libraries use the same krb5.conf configuration file format as MIT Kerberos, described [here](https://web.mit.edu/kerberos/krb5-latest/doc/admin/conf_files/krb5_conf.html).
Config instances can be created by loading from a file path or by passing a string, io.Reader or bufio.Scanner to the relevant method:
```go
import "gopkg.in/jcmturner/gokrb5.v1/config"
import "gopkg.in/jcmturner/gokrb5.v2/config"
cfg, err := config.Load("/path/to/config/file")
cfg, err := config.NewConfigFromString(krb5Str) //String must have appropriate newline separations
cfg, err := config.NewConfigFromReader(reader)
Expand All @@ -60,7 +60,7 @@ cfg, err := config.NewConfigFromScanner(scanner)
### Keytab files
Standard keytab files can be read from a file or from a slice of bytes:
```go
import "gopkg.in/jcmturner/gokrb5.v1/keytab"
import "gopkg.in/jcmturner/gokrb5.v2/keytab"
ktFromFile, err := keytab.Load("/path/to/file.keytab")
ktFromBytes, err := keytab.Parse(b)

Expand All @@ -71,7 +71,7 @@ ktFromBytes, err := keytab.Parse(b)
### Kerberos Client
Create a client instance with either a password or a keytab:
```go
import "gopkg.in/jcmturner/gokrb5.v1/client"
import "gopkg.in/jcmturner/gokrb5.v2/client"
cl := client.NewClientWithPassword("username", "REALM.COM", "password")
cl := client.NewClientWithKeytab("username", "REALM.COM", kt)

Expand Down Expand Up @@ -177,7 +177,7 @@ if validuser, ok := ctx.Value(service.CTXKeyAuthenticated).(bool); ok && validus
#### Generic Kerberised Service - Validating Client Details
To validate the AP_REQ sent by the client on the service side call this method:
```go
import "gopkg.in/jcmturner/gokrb5.v1/service"
import "gopkg.in/jcmturner/gokrb5.v2/service"
if ok, creds, err := serivce.ValidateAPREQ(mt.APReq, kt, r.RemoteAddr); ok {
// Perform application specifc actions
// creds object has details about the client identity
Expand Down
14 changes: 7 additions & 7 deletions client/ASExchange.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package client

import (
"gopkg.in/jcmturner/gokrb5.v1/crypto"
"gopkg.in/jcmturner/gokrb5.v1/iana/errorcode"
"gopkg.in/jcmturner/gokrb5.v1/iana/keyusage"
"gopkg.in/jcmturner/gokrb5.v1/iana/patype"
"gopkg.in/jcmturner/gokrb5.v1/krberror"
"gopkg.in/jcmturner/gokrb5.v1/messages"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/crypto"
"gopkg.in/jcmturner/gokrb5.v2/iana/errorcode"
"gopkg.in/jcmturner/gokrb5.v2/iana/keyusage"
"gopkg.in/jcmturner/gokrb5.v2/iana/patype"
"gopkg.in/jcmturner/gokrb5.v2/krberror"
"gopkg.in/jcmturner/gokrb5.v2/messages"
"gopkg.in/jcmturner/gokrb5.v2/types"
"sort"
)

Expand Down
8 changes: 4 additions & 4 deletions client/TGSExchange.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package client

import (
"gopkg.in/jcmturner/gokrb5.v1/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v1/krberror"
"gopkg.in/jcmturner/gokrb5.v1/messages"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v2/krberror"
"gopkg.in/jcmturner/gokrb5.v2/messages"
"gopkg.in/jcmturner/gokrb5.v2/types"
"strings"
"time"
)
Expand Down
4 changes: 2 additions & 2 deletions client/cache.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package client

import (
"gopkg.in/jcmturner/gokrb5.v1/messages"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/messages"
"gopkg.in/jcmturner/gokrb5.v2/types"
"strings"
"sync"
"time"
Expand Down
18 changes: 9 additions & 9 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ package client
import (
"errors"
"fmt"
"gopkg.in/jcmturner/gokrb5.v1/config"
"gopkg.in/jcmturner/gokrb5.v1/credentials"
"gopkg.in/jcmturner/gokrb5.v1/crypto"
"gopkg.in/jcmturner/gokrb5.v1/crypto/etype"
"gopkg.in/jcmturner/gokrb5.v1/iana/errorcode"
"gopkg.in/jcmturner/gokrb5.v1/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v1/keytab"
"gopkg.in/jcmturner/gokrb5.v1/messages"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/config"
"gopkg.in/jcmturner/gokrb5.v2/credentials"
"gopkg.in/jcmturner/gokrb5.v2/crypto"
"gopkg.in/jcmturner/gokrb5.v2/crypto/etype"
"gopkg.in/jcmturner/gokrb5.v2/iana/errorcode"
"gopkg.in/jcmturner/gokrb5.v2/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v2/keytab"
"gopkg.in/jcmturner/gokrb5.v2/messages"
"gopkg.in/jcmturner/gokrb5.v2/types"
)

// Client side configuration and state.
Expand Down
8 changes: 4 additions & 4 deletions client/client_ad_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package client
import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"gopkg.in/jcmturner/gokrb5.v1/config"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v1/keytab"
"gopkg.in/jcmturner/gokrb5.v1/testdata"
"gopkg.in/jcmturner/gokrb5.v2/config"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/keytab"
"gopkg.in/jcmturner/gokrb5.v2/testdata"
"testing"
)

Expand Down
10 changes: 5 additions & 5 deletions client/client_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ package client
import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"gopkg.in/jcmturner/gokrb5.v1/config"
"gopkg.in/jcmturner/gokrb5.v1/credentials"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v1/keytab"
"gopkg.in/jcmturner/gokrb5.v1/testdata"
"gopkg.in/jcmturner/gokrb5.v2/config"
"gopkg.in/jcmturner/gokrb5.v2/credentials"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/keytab"
"gopkg.in/jcmturner/gokrb5.v2/testdata"
"net/http"
"os"
"testing"
Expand Down
10 changes: 5 additions & 5 deletions client/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package client
import (
"encoding/base64"
"fmt"
"gopkg.in/jcmturner/gokrb5.v1/credentials"
"gopkg.in/jcmturner/gokrb5.v1/gssapi"
"gopkg.in/jcmturner/gokrb5.v1/krberror"
"gopkg.in/jcmturner/gokrb5.v1/messages"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/credentials"
"gopkg.in/jcmturner/gokrb5.v2/gssapi"
"gopkg.in/jcmturner/gokrb5.v2/krberror"
"gopkg.in/jcmturner/gokrb5.v2/messages"
"gopkg.in/jcmturner/gokrb5.v2/types"
"net/http"
"strings"
)
Expand Down
4 changes: 2 additions & 2 deletions client/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"encoding/binary"
"fmt"
"gopkg.in/jcmturner/gokrb5.v1/iana/errorcode"
"gopkg.in/jcmturner/gokrb5.v1/messages"
"gopkg.in/jcmturner/gokrb5.v2/iana/errorcode"
"gopkg.in/jcmturner/gokrb5.v2/messages"
"io"
"math/rand"
"net"
Expand Down
8 changes: 4 additions & 4 deletions client/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package client

import (
"fmt"
"gopkg.in/jcmturner/gokrb5.v1/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v1/krberror"
"gopkg.in/jcmturner/gokrb5.v1/messages"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v2/krberror"
"gopkg.in/jcmturner/gokrb5.v2/messages"
"gopkg.in/jcmturner/gokrb5.v2/types"
"sync"
"time"
)
Expand Down
2 changes: 1 addition & 1 deletion config/krb5conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"errors"
"fmt"
"github.com/jcmturner/asn1"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"io"
"os"
"os/user"
Expand Down
2 changes: 1 addition & 1 deletion credentials/ccache.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/binary"
"errors"
"github.com/jcmturner/asn1"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/types"
"io/ioutil"
"strings"
"time"
Expand Down
6 changes: 3 additions & 3 deletions credentials/ccache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package credentials
import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"gopkg.in/jcmturner/gokrb5.v1/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v1/testdata"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v2/testdata"
"gopkg.in/jcmturner/gokrb5.v2/types"
"testing"
)

Expand Down
6 changes: 3 additions & 3 deletions credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package credentials

import (
"github.com/hashicorp/go-uuid"
"gopkg.in/jcmturner/gokrb5.v1/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v1/keytab"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v2/keytab"
"gopkg.in/jcmturner/gokrb5.v2/types"
"time"
)

Expand Down
10 changes: 5 additions & 5 deletions crypto/aes128-cts-hmac-sha1-96.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"crypto/aes"
"crypto/hmac"
"crypto/sha1"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc3961"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc3962"
"gopkg.in/jcmturner/gokrb5.v1/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc3961"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc3962"
"gopkg.in/jcmturner/gokrb5.v2/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"hash"
)

Expand Down
4 changes: 2 additions & 2 deletions crypto/aes128-cts-hmac-sha1-96_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package crypto
import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc3962"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc3962"
"testing"
)

Expand Down
8 changes: 4 additions & 4 deletions crypto/aes128-cts-hmac-sha256-128.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"crypto/aes"
"crypto/hmac"
"crypto/sha256"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc8009"
"gopkg.in/jcmturner/gokrb5.v1/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc8009"
"gopkg.in/jcmturner/gokrb5.v2/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"hash"
)

Expand Down
4 changes: 2 additions & 2 deletions crypto/aes128-cts-hmac-sha256-128_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package crypto
import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc8009"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc8009"
"testing"
)

Expand Down
10 changes: 5 additions & 5 deletions crypto/aes256-cts-hmac-sha1-96.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"crypto/aes"
"crypto/hmac"
"crypto/sha1"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc3961"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc3962"
"gopkg.in/jcmturner/gokrb5.v1/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc3961"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc3962"
"gopkg.in/jcmturner/gokrb5.v2/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"hash"
)

Expand Down
4 changes: 2 additions & 2 deletions crypto/aes256-cts-hmac-sha1-96_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package crypto
import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc3962"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc3962"
"testing"
)

Expand Down
8 changes: 4 additions & 4 deletions crypto/aes256-cts-hmac-sha384-192.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"crypto/aes"
"crypto/hmac"
"crypto/sha512"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc8009"
"gopkg.in/jcmturner/gokrb5.v1/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc8009"
"gopkg.in/jcmturner/gokrb5.v2/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"hash"
)

Expand Down
4 changes: 2 additions & 2 deletions crypto/aes256-cts-hmac-sha384-192_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package crypto
import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc8009"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc8009"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion crypto/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"gopkg.in/jcmturner/gokrb5.v1/crypto/etype"
"gopkg.in/jcmturner/gokrb5.v2/crypto/etype"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ package crypto
import (
"encoding/hex"
"fmt"
"gopkg.in/jcmturner/gokrb5.v1/crypto/etype"
"gopkg.in/jcmturner/gokrb5.v1/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v1/iana/patype"
"gopkg.in/jcmturner/gokrb5.v1/types"
"gopkg.in/jcmturner/gokrb5.v2/crypto/etype"
"gopkg.in/jcmturner/gokrb5.v2/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/iana/patype"
"gopkg.in/jcmturner/gokrb5.v2/types"
"os"
)

Expand Down
8 changes: 4 additions & 4 deletions crypto/des3-cbc-sha1-kd.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"crypto/hmac"
"crypto/sha1"
"errors"
"gopkg.in/jcmturner/gokrb5.v1/crypto/common"
"gopkg.in/jcmturner/gokrb5.v1/crypto/rfc3961"
"gopkg.in/jcmturner/gokrb5.v1/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v1/iana/etypeID"
"gopkg.in/jcmturner/gokrb5.v2/crypto/common"
"gopkg.in/jcmturner/gokrb5.v2/crypto/rfc3961"
"gopkg.in/jcmturner/gokrb5.v2/iana/chksumtype"
"gopkg.in/jcmturner/gokrb5.v2/iana/etypeID"
"hash"
)

Expand Down
Loading

0 comments on commit f6e17ea

Please sign in to comment.