public unsafe void GetPEMEncodedIssuerChain(UIntPtr *chainCount, cef_binary_value_t **chain) { fixed(cef_x509certificate_t *self = &this) { ((delegate * unmanaged[Stdcall] < cef_x509certificate_t *, UIntPtr *, cef_binary_value_t **, void >)get_pemencoded_issuer_chain)(self, chainCount, chain); } }
/// <summary> /// Returns the PEM encoded data for the certificate issuer chain. If we failed /// to encode a certificate in the chain it is still present in the array but /// is an NULL string. /// </summary> public unsafe virtual void GetPEMEncodedIssuerChain(ref long chainCount, ref CefBinaryValue[] chain) { var c1 = new UIntPtr((uint)chain.Length); cef_binary_value_t **arr1 = (cef_binary_value_t **)Marshal.AllocHGlobal(sizeof(cef_binary_value_t *) * chain.Length); for (int i = 0; i < chain.Length; i++) { var e1 = chain[i]; *(arr1 + i) = e1 != null?e1.GetNativeInstance() : null; } NativeInstance->GetPEMEncodedIssuerChain(&c1, arr1); chainCount = (long)c1; for (int i = (int)c1; i >= 0; i--) { chain[i] = CefBinaryValue.Wrap(CefBinaryValue.Create, *(arr1 + i)); } Marshal.FreeHGlobal((IntPtr)arr1); GC.KeepAlive(this); }
public static void get_pemencoded_issuer_chain(cef_x509certificate_t *self, UIntPtr *chainCount, cef_binary_value_t **chain) { get_pemencoded_issuer_chain_delegate d; var p = self->_get_pemencoded_issuer_chain; if (p == _pd) { d = _dd; } else { d = (get_pemencoded_issuer_chain_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_pemencoded_issuer_chain_delegate)); if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } } d(self, chainCount, chain); }
public unsafe extern void GetPEMEncodedIssuerChain(UIntPtr *chainCount, cef_binary_value_t **chain);
public static void get_derencoded_issuer_chain(cef_sslinfo_t *self, UIntPtr *chainCount, cef_binary_value_t **chain) { get_derencoded_issuer_chain_delegate d; var p = self->_get_derencoded_issuer_chain; if (p == _pe) { d = _de; } else { d = (get_derencoded_issuer_chain_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_derencoded_issuer_chain_delegate)); if (_pe == IntPtr.Zero) { _de = d; _pe = p; } } d(self, chainCount, chain); }