docs: Update TOC
1 file changed
tree: 4a185918a1112497009c9b21340946048e7a67ea
  1. .dockerignore
  2. .github/
  3. .gitignore
  4. .goosarch
  5. Dockerfile
  6. LICENSE
  7. Makefile
  8. README.md
  9. VERSION.txt
  10. basic.mk
  11. cgo_helpers.go
  12. cgo_helpers.h
  13. const.go
  14. doc.go
  15. hack/
  16. internal.h
  17. types.go
  18. ykpiv-version.h
  19. ykpiv.go
  20. ykpiv.h
  21. ykpiv.yml
README.md

Table of Contents

ykpiv

make-all make-image make-test GoDoc

Go bindings for ykpiv so you can write Go to interact with your yubikeys. The C library lives at yubico/yubico-piv-tool.

C Libraries Required for Compilation

Example

package main

import (
	"fmt"
	"log"

	"github.com/jessfraz/ykpiv"
)

func main() {
	s := ykpiv.NewState()
	defer s.Free()

	// Let's get the readers
	readers := make([]byte, 2048)
	len := []uint{2048}
	log.Println("list")
	err := ykpiv.ListReaders([]ykpiv.State{*s}, readers, len)
	if err != 0 {
		log.Fatalf("%s: %#v", ykpiv.Strerror(err), err)
	}

	fmt.Printf("readers: %s\n", string(readers))
}

Starting pcscd

Hopefully your operating system does this for you with a nice init script but if not here you go:

$ sudo LIBCCID_ifdLogLevel=0x000F /usr/sbin/pcscd --foreground --debug --apdu --color
$ sudo /usr/sbin/pcscd --hotplug