// SaveSecret saves the secret key to a file func (c *Cert) SaveSecret(filename string) error { rc := C.zcert_save_secret(c.zcertT, C.CString(filename)) if rc == C.int(-1) { return fmt.Errorf("SaveSecret error") } return nil }
// SaveSecret saves the secret key to a file func (c *Cert) SaveSecret(filename string) error { cFilename := C.CString(filename) defer C.free(unsafe.Pointer(cFilename)) rc := C.zcert_save_secret(c.zcertT, cFilename) if rc == C.int(-1) { return fmt.Errorf("SaveSecret error") } return nil }