예제 #1
0
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	ptr := C.zcertstore_lookup(c.zcertstoreT, C.CString(key))
	if ptr == nil {
		return nil
	}
	return &Cert{
		zcertT: ptr,
	}
}
예제 #2
0
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	cKey := C.CString(key)
	defer C.free(unsafe.Pointer(cKey))

	ptr := C.zcertstore_lookup(c.zcertstoreT, cKey)
	if ptr == nil {
		return nil
	}
	return &Cert{
		zcertT: ptr,
	}
}
예제 #3
0
파일: certstore.go 프로젝트: vonwenm/goczmq
// Lookup looks up a certificate in the store by public key and
// returns it.
func (c *CertStore) Lookup(key string) *Cert {
	return &Cert{
		zcertT: C.zcertstore_lookup(c.zcertstoreT, C.CString(key)),
	}
}