Giter Site home page Giter Site logo

Comments (2)

ferringb avatar ferringb commented on July 18, 2024

You want this instead:

package main

import (
	"fmt"

	"github.com/cloudflare/certmgr/cert"
	"github.com/cloudflare/cfssl/csr"
)

func main() {
	c := csr.New()
	x := &cert.Spec{
		Request: c,
		Key:     &cert.File{},
		Cert:    &cert.CertificateFile{},
	}
	fmt.Println(x)
}

Note that in the next API breakage I'll be converting the Key field to a cert.KeyFile ; I've been moving logic down into each of those to simplify other internals. If you have complaints with the encapsulation, let me know.

Regarding Request: c; I'm assuming your cfssl/csr version in your GOPATH doesn't match what we have vendored for certmgr; we have 2001f384ec4fea8e6e648cd89d07bda9bd7568c1 vendored (one commit after 1.3.3 carrying yaml parsing fixes). That's my assumption, but go vendoring is still a bit messy/voodoo-y to me for imports like this.

@cbroglie any comment on above regarding vendoring?

from certmgr.

Lekensteyn avatar Lekensteyn commented on July 18, 2024

That example code was taken from an existing project that indeed did not vendor anything. It looks like there was a go.mod file in the project and I had to use GO111MODULE=on go mod download instead of go get to obtain the right versions.

from certmgr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.