Skip to content

Commit

Permalink
Add simple validate funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamar committed Mar 11, 2015
1 parent 1fdacf7 commit 1505be7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rafiki/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ func NewRafikiKey(buf []byte) *Key {

}

func validCSR(input []byte) bool {

_, err := x509.ParseCertificateRequest(input)
if err != nil {
return false
}
return true

}

func NewRafikiInit(c *cli.Context, checkAuth bool) (raf *Rafiki) {

var filePath string
Expand Down

0 comments on commit 1505be7

Please sign in to comment.