vendor: bump miekg/pkcs11 v1.0.3

full diff: https://github.com/miekg/pkcs11/compare/v1.0.2...v1.0.3

- miekg/pkcs11#100 Add typed convenience `Find...` methods to `Session`
- miekg/pkcs11#115 Add CK_EFFECTIVELY_INFINITE and CK_UNAVAILABLE_INFORMATION

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-01-16 17:30:06 +01:00
parent c6d10b6da0
commit b53ffd6c1f
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
4 changed files with 61 additions and 50 deletions

View File

@ -43,7 +43,7 @@ github.com/mattn/go-shellwords 36a9b3c57cb5caa559ff63fb7e9b
github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c # v1.0.1
github.com/Microsoft/go-winio 6c72808b55902eae4c5943626030429ff20f3b63 # v0.4.14
github.com/Microsoft/hcsshim b3f49c06ffaeef24d09c6c08ec8ec8425a0303e2
github.com/miekg/pkcs11 cb39313ec884f2cd77f4762875fe96aecf68f8e3 # v1.0.2
github.com/miekg/pkcs11 210dc1e16747c5ba98a03bcbcf728c38086ea357 # v1.0.3
github.com/mitchellh/mapstructure f15292f7a699fcc1a38a80977f80a046874ba8ac
github.com/moby/buildkit 4f4e03067523b2fc5ca2f17514a5e75ad63e02fb
github.com/modern-go/concurrent bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94 # 1.0.3

View File

@ -1,7 +1,7 @@
# PKCS#11 [![Build Status](https://travis-ci.org/miekg/pkcs11.png?branch=master)](https://travis-ci.org/miekg/pkcs11) [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/miekg/pkcs11)
This is a Go implementation of the PKCS#11 API. It wraps the library closely, but uses Go idiom
were it makes sense. It has been tested with SoftHSM.
This is a Go implementation of the PKCS#11 API. It wraps the library closely, but uses Go idiom were
it makes sense. It has been tested with SoftHSM.
## SoftHSM
@ -9,16 +9,21 @@ were it makes sense. It has been tested with SoftHSM.
* Then use `softhsm` to init it
~~~
softhsm --init-token --slot 0 --label test --pin 1234
~~~
* Then use `libsofthsm.so` as the pkcs11 module:
```go
~~~ go
p := pkcs11.New("/usr/lib/softhsm/libsofthsm.so")
```
~~~
## Examples
A skeleton program would look somewhat like this (yes, pkcs#11 is verbose):
```go
~~~ go
p := pkcs11.New("/usr/lib/softhsm/libsofthsm.so")
err := p.Initialize()
if err != nil {
@ -55,14 +60,9 @@ A skeleton program would look somewhat like this (yes, pkcs#11 is verbose):
fmt.Printf("%x", d)
}
fmt.Println()
```
~~~
Further examples are included in the tests.
To expose PKCS#11 keys using the
[crypto.Signer interface](https://golang.org/pkg/crypto/#Signer),
To expose PKCS#11 keys using the [crypto.Signer interface](https://golang.org/pkg/crypto/#Signer),
please see [github.com/thalesignite/crypto11](https://github.com/thalesignite/crypto11).
# TODO
* Fix/double check endian stuff, see types.go NewAttribute()
* Look at the memory copying in fast functions (sign, hash etc)

View File

@ -723,3 +723,14 @@ const (
CKD_NULL = 0x00000001
CKD_SHA1_KDF = 0x00000002
)
// Special return values defined in PKCS#11 v2.40 section 3.2.
const (
// CK_EFFECTIVELY_INFINITE may be returned in the CK_TOKEN_INFO fields ulMaxSessionCount and ulMaxRwSessionCount.
// It indicates there is no practical limit on the number of sessions.
CK_EFFECTIVELY_INFINITE = 0
// CK_UNAVAILABLE_INFORMATION may be returned for several fields within CK_TOKEN_INFO. It indicates
// the token is unable or unwilling to provide the requested information.
CK_UNAVAILABLE_INFORMATION = ^uint(0)
)

View File

@ -5,7 +5,7 @@ package pkcs11
import "fmt"
// Release is current version of the pkcs11 library.
var Release = R{1, 0, 2}
var Release = R{1, 0, 3}
// R holds the version of this library.
type R struct {