Skip to content

Commit

Permalink
feat: regenerate bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jun 29, 2024
1 parent b93df97 commit 30cc873
Showing 1 changed file with 89 additions and 61 deletions.
150 changes: 89 additions & 61 deletions lib/src/generated/ffi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
// ignore_for_file: type=lint
import 'dart:ffi' as ffi;

/// Bindings to OpenSSL for DTLS support in Dart.
Expand Down Expand Up @@ -174,11 +175,11 @@ class OpenSsl {
_BIO_ADDR_freePtr.asFunction<void Function(ffi.Pointer<BIO_ADDR>)>();

int X509_STORE_add_cert(
ffi.Pointer<X509_STORE> ctx,
ffi.Pointer<X509_STORE> xs,
ffi.Pointer<X509> x,
) {
return _X509_STORE_add_cert(
ctx,
xs,
x,
);
}
Expand Down Expand Up @@ -251,7 +252,8 @@ class OpenSsl {
ffi.Pointer<SSL_CTX> ctx,
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<SSL>, ffi.Int, ffi.Int)>>
ffi.Void Function(
ffi.Pointer<SSL> ssl, ffi.Int type, ffi.Int val)>>
cb,
) {
return _SSL_CTX_set_info_callback(
Expand All @@ -266,25 +268,25 @@ class OpenSsl {
ffi.Pointer<SSL_CTX>,
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<SSL>, ffi.Int,
ffi.Int)>>)>>('SSL_CTX_set_info_callback');
ffi.Void Function(ffi.Pointer<SSL> ssl, ffi.Int type,
ffi.Int val)>>)>>('SSL_CTX_set_info_callback');
late final _SSL_CTX_set_info_callback =
_SSL_CTX_set_info_callbackPtr.asFunction<
void Function(
ffi.Pointer<SSL_CTX>,
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<SSL>, ffi.Int, ffi.Int)>>)>();
ffi.Void Function(ffi.Pointer<SSL> ssl, ffi.Int type,
ffi.Int val)>>)>();

void SSL_CTX_set_cookie_generate_cb(
ffi.Pointer<SSL_CTX> ctx,
ffi.Pointer<
ffi.NativeFunction<
ffi.Int Function(
ffi.Pointer<SSL>,
ffi.Pointer<ffi.UnsignedChar>,
ffi.Pointer<ffi.UnsignedInt>)>>
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.UnsignedChar> cookie,
ffi.Pointer<ffi.UnsignedInt> cookie_len)>>
app_gen_cookie_cb,
) {
return _SSL_CTX_set_cookie_generate_cb(
Expand All @@ -300,9 +302,9 @@ class OpenSsl {
ffi.Pointer<
ffi.NativeFunction<
ffi.Int Function(
ffi.Pointer<SSL>,
ffi.Pointer<ffi.UnsignedChar>,
ffi.Pointer<ffi.UnsignedInt>)>>)>>(
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.UnsignedChar> cookie,
ffi.Pointer<ffi.UnsignedInt> cookie_len)>>)>>(
'SSL_CTX_set_cookie_generate_cb');
late final _SSL_CTX_set_cookie_generate_cb =
_SSL_CTX_set_cookie_generate_cbPtr.asFunction<
Expand All @@ -311,16 +313,18 @@ class OpenSsl {
ffi.Pointer<
ffi.NativeFunction<
ffi.Int Function(
ffi.Pointer<SSL>,
ffi.Pointer<ffi.UnsignedChar>,
ffi.Pointer<ffi.UnsignedInt>)>>)>();
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.UnsignedChar> cookie,
ffi.Pointer<ffi.UnsignedInt> cookie_len)>>)>();

void SSL_CTX_set_cookie_verify_cb(
ffi.Pointer<SSL_CTX> ctx,
ffi.Pointer<
ffi.NativeFunction<
ffi.Int Function(ffi.Pointer<SSL>,
ffi.Pointer<ffi.UnsignedChar>, ffi.UnsignedInt)>>
ffi.Int Function(
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.UnsignedChar> cookie,
ffi.UnsignedInt cookie_len)>>
app_verify_cookie_cb,
) {
return _SSL_CTX_set_cookie_verify_cb(
Expand All @@ -330,23 +334,26 @@ class OpenSsl {
}

late final _SSL_CTX_set_cookie_verify_cbPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<SSL_CTX>,
ffi.Pointer<
ffi.NativeFunction<
ffi.Int Function(
ffi.Pointer<SSL>,
ffi.Pointer<ffi.UnsignedChar>,
ffi.UnsignedInt)>>)>>('SSL_CTX_set_cookie_verify_cb');
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<SSL_CTX>,
ffi.Pointer<
ffi.NativeFunction<
ffi.Int Function(
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.UnsignedChar> cookie,
ffi.UnsignedInt cookie_len)>>)>>(
'SSL_CTX_set_cookie_verify_cb');
late final _SSL_CTX_set_cookie_verify_cb =
_SSL_CTX_set_cookie_verify_cbPtr.asFunction<
void Function(
ffi.Pointer<SSL_CTX>,
ffi.Pointer<
ffi.NativeFunction<
ffi.Int Function(ffi.Pointer<SSL>,
ffi.Pointer<ffi.UnsignedChar>, ffi.UnsignedInt)>>)>();
ffi.Int Function(
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.UnsignedChar> cookie,
ffi.UnsignedInt cookie_len)>>)>();

void SSL_set_psk_client_callback(
ffi.Pointer<SSL> ssl,
Expand Down Expand Up @@ -767,72 +774,93 @@ class OpenSsl {
ffi.Pointer<ffi.Char> Function(int, ffi.Pointer<ffi.Char>)>();
}

class timeval extends ffi.Struct {
@__time_t()
final class timeval extends ffi.Struct {
@__darwin_time_t()
external int tv_sec;

@__suseconds_t()
@__darwin_suseconds_t()
external int tv_usec;
}

typedef __time_t = ffi.Long;
typedef __suseconds_t = ffi.Long;
typedef __darwin_time_t = ffi.Long;
typedef Dart__darwin_time_t = int;
typedef __darwin_suseconds_t = __int32_t;
typedef __int32_t = ffi.Int;
typedef Dart__int32_t = int;
typedef BIO = bio_st;

class bio_st extends ffi.Opaque {}
final class bio_st extends ffi.Opaque {}

typedef BIO_METHOD = bio_method_st;

class bio_method_st extends ffi.Opaque {}
final class bio_method_st extends ffi.Opaque {}

typedef BIO_ADDR = bio_addr_st;

class bio_addr_st extends ffi.Opaque {}
final class bio_addr_st extends ffi.Opaque {}

typedef X509_STORE = x509_store_st;

class x509_store_st extends ffi.Opaque {}
final class x509_store_st extends ffi.Opaque {}

typedef X509 = x509_st;

class x509_st extends ffi.Opaque {}
final class x509_st extends ffi.Opaque {}

typedef X509_VERIFY_PARAM = X509_VERIFY_PARAM_st;

class X509_VERIFY_PARAM_st extends ffi.Opaque {}
final class X509_VERIFY_PARAM_st extends ffi.Opaque {}

typedef SSL_CTX = ssl_ctx_st;

class ssl_ctx_st extends ffi.Opaque {}
final class ssl_ctx_st extends ffi.Opaque {}

typedef SSL = ssl_st;

class ssl_st extends ffi.Opaque {}

typedef SSL_psk_client_cb_func = ffi.Pointer<
ffi.NativeFunction<
ffi.UnsignedInt Function(
ffi.Pointer<SSL>,
ffi.Pointer<ffi.Char>,
ffi.Pointer<ffi.Char>,
ffi.UnsignedInt,
ffi.Pointer<ffi.UnsignedChar>,
ffi.UnsignedInt)>>;
typedef SSL_psk_server_cb_func = ffi.Pointer<
ffi.NativeFunction<
ffi.UnsignedInt Function(ffi.Pointer<SSL>, ffi.Pointer<ffi.Char>,
ffi.Pointer<ffi.UnsignedChar>, ffi.UnsignedInt)>>;
final class ssl_st extends ffi.Opaque {}

typedef SSL_psk_client_cb_func
= ffi.Pointer<ffi.NativeFunction<SSL_psk_client_cb_funcFunction>>;
typedef SSL_psk_client_cb_funcFunction = ffi.UnsignedInt Function(
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.Char> hint,
ffi.Pointer<ffi.Char> identity,
ffi.UnsignedInt max_identity_len,
ffi.Pointer<ffi.UnsignedChar> psk,
ffi.UnsignedInt max_psk_len);
typedef DartSSL_psk_client_cb_funcFunction = int Function(
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.Char> hint,
ffi.Pointer<ffi.Char> identity,
int max_identity_len,
ffi.Pointer<ffi.UnsignedChar> psk,
int max_psk_len);
typedef SSL_psk_server_cb_func
= ffi.Pointer<ffi.NativeFunction<SSL_psk_server_cb_funcFunction>>;
typedef SSL_psk_server_cb_funcFunction = ffi.UnsignedInt Function(
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.Char> identity,
ffi.Pointer<ffi.UnsignedChar> psk,
ffi.UnsignedInt max_psk_len);
typedef DartSSL_psk_server_cb_funcFunction = int Function(
ffi.Pointer<SSL> ssl,
ffi.Pointer<ffi.Char> identity,
ffi.Pointer<ffi.UnsignedChar> psk,
int max_psk_len);
typedef SSL_METHOD = ssl_method_st;

class ssl_method_st extends ffi.Opaque {}
final class ssl_method_st extends ffi.Opaque {}

typedef SSL_verify_cb = ffi.Pointer<
ffi.NativeFunction<ffi.Int Function(ffi.Int, ffi.Pointer<X509_STORE_CTX>)>>;
typedef SSL_verify_cb = ffi.Pointer<ffi.NativeFunction<SSL_verify_cbFunction>>;
typedef SSL_verify_cbFunction = ffi.Int Function(
ffi.Int preverify_ok, ffi.Pointer<X509_STORE_CTX> x509_ctx);
typedef DartSSL_verify_cbFunction = int Function(
int preverify_ok, ffi.Pointer<X509_STORE_CTX> x509_ctx);
typedef X509_STORE_CTX = x509_store_ctx_st;

class x509_store_ctx_st extends ffi.Opaque {}
final class x509_store_ctx_st extends ffi.Opaque {}

class stack_st_SSL_CIPHER extends ffi.Opaque {}
final class stack_st_SSL_CIPHER extends ffi.Opaque {}

const int BIO_C_SET_BUF_MEM_EOF_RETURN = 130;

Expand Down

0 comments on commit 30cc873

Please sign in to comment.