cloudflare / certmgr

Automated certificate management using a CFSSL CA.
BSD 2-Clause "Simplified" License
218 stars 40 forks source link

Support on Windows #61

Open naphta opened 5 years ago

naphta commented 5 years ago

Just wondering if there's any plans to support Windows (or if it's theoretically even possible). I did try cross compiling on go 1.12.5 without any luck but I'm not sure if that's a general incompatibility with that version of golang.

anita-tenjarla commented 5 years ago

Hmm... I'm not on Windows so I'm not familiar with golang quirks there, but I do know that certmgr makes heavy usage of the cfssl library (https://github.com/cloudflare/cfssl), which uses cgo. That's the reason I had to write a Makefile and Dockerfile to spin up a container just to do some unit testing... cross compiling locally was throwing me cgo-related errors.

A quick search on cross compiling and cgo brings up https://github.com/golang/go/issues/30863, which says "When trying to cross-compile a Go program that uses cgo, you need to have a C cross-compiler." Maybe messing around with something like https://github.com/karalabe/xgo could help.

ferringb commented 4 years ago

@naphta My expectations are that cloudflare is unlikely to be interested in implementing windows support. That said, I expect we wouldn't be opposed to a PR if it's well contained.

There will have to be work done on cfssl to support this (minimally renaming of some CA bundles since they have windows incompatible names) and there is some pathways being added for signal handling that will have to be adapted for windows.

Can you take a stab at a first pass for this?