Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
52ca433e
Commit
52ca433e
authored
3 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
bcrypt: Add a helper macros to load GnuTLS optional functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e4f716bc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/bcrypt/gnutls.c
+23
-75
23 additions, 75 deletions
dlls/bcrypt/gnutls.c
with
23 additions
and
75 deletions
dlls/bcrypt/gnutls.c
+
23
−
75
View file @
52ca433e
...
...
@@ -274,87 +274,35 @@ static BOOL gnutls_initialize(void)
LOAD_FUNCPTR
(
gnutls_pubkey_init
);
#undef LOAD_FUNCPTR
if
(
!
(
pgnutls_cipher_tag
=
dlsym
(
libgnutls_handle
,
"gnutls_cipher_tag"
)))
{
WARN
(
"gnutls_cipher_tag not found
\n
"
);
pgnutls_cipher_tag
=
compat_gnutls_cipher_tag
;
}
if
(
!
(
pgnutls_cipher_add_auth
=
dlsym
(
libgnutls_handle
,
"gnutls_cipher_add_auth"
)))
{
WARN
(
"gnutls_cipher_add_auth not found
\n
"
);
pgnutls_cipher_add_auth
=
compat_gnutls_cipher_add_auth
;
}
#define LOAD_FUNCPTR_OPT(f) \
if (!(p##f = dlsym( libgnutls_handle, #f ))) \
{ \
WARN( "failed to load %s\n", #f ); \
p##f = compat_##f; \
}
LOAD_FUNCPTR_OPT
(
gnutls_cipher_tag
)
LOAD_FUNCPTR_OPT
(
gnutls_cipher_add_auth
)
LOAD_FUNCPTR_OPT
(
gnutls_pubkey_import_ecc_raw
)
LOAD_FUNCPTR_OPT
(
gnutls_privkey_export_rsa_raw
)
LOAD_FUNCPTR_OPT
(
gnutls_privkey_export_ecc_raw
)
LOAD_FUNCPTR_OPT
(
gnutls_privkey_import_ecc_raw
)
LOAD_FUNCPTR_OPT
(
gnutls_privkey_export_dsa_raw
)
LOAD_FUNCPTR_OPT
(
gnutls_pk_to_sign
)
LOAD_FUNCPTR_OPT
(
gnutls_pubkey_verify_hash2
)
LOAD_FUNCPTR_OPT
(
gnutls_pubkey_import_rsa_raw
)
LOAD_FUNCPTR_OPT
(
gnutls_pubkey_import_dsa_raw
)
LOAD_FUNCPTR_OPT
(
gnutls_privkey_generate
)
LOAD_FUNCPTR_OPT
(
gnutls_decode_rs_value
)
LOAD_FUNCPTR_OPT
(
gnutls_privkey_import_rsa_raw
)
LOAD_FUNCPTR_OPT
(
gnutls_privkey_decrypt_data
)
#undef LOAD_FUNCPTR_OPT
if
((
ret
=
pgnutls_global_init
())
!=
GNUTLS_E_SUCCESS
)
{
pgnutls_perror
(
ret
);
goto
fail
;
}
if
(
!
(
pgnutls_pubkey_import_ecc_raw
=
dlsym
(
libgnutls_handle
,
"gnutls_pubkey_import_ecc_raw"
)))
{
WARN
(
"gnutls_pubkey_import_ecc_raw not found
\n
"
);
pgnutls_pubkey_import_ecc_raw
=
compat_gnutls_pubkey_import_ecc_raw
;
}
if
(
!
(
pgnutls_privkey_export_rsa_raw
=
dlsym
(
libgnutls_handle
,
"gnutls_privkey_export_rsa_raw"
)))
{
WARN
(
"gnutls_privkey_export_rsa_raw not found
\n
"
);
pgnutls_privkey_export_rsa_raw
=
compat_gnutls_privkey_export_rsa_raw
;
}
if
(
!
(
pgnutls_privkey_export_ecc_raw
=
dlsym
(
libgnutls_handle
,
"gnutls_privkey_export_ecc_raw"
)))
{
WARN
(
"gnutls_privkey_export_ecc_raw not found
\n
"
);
pgnutls_privkey_export_ecc_raw
=
compat_gnutls_privkey_export_ecc_raw
;
}
if
(
!
(
pgnutls_privkey_import_ecc_raw
=
dlsym
(
libgnutls_handle
,
"gnutls_privkey_import_ecc_raw"
)))
{
WARN
(
"gnutls_privkey_import_ecc_raw not found
\n
"
);
pgnutls_privkey_import_ecc_raw
=
compat_gnutls_privkey_import_ecc_raw
;
}
if
(
!
(
pgnutls_privkey_export_dsa_raw
=
dlsym
(
libgnutls_handle
,
"gnutls_privkey_export_dsa_raw"
)))
{
WARN
(
"gnutls_privkey_export_dsa_raw not found
\n
"
);
pgnutls_privkey_export_dsa_raw
=
compat_gnutls_privkey_export_dsa_raw
;
}
if
(
!
(
pgnutls_pk_to_sign
=
dlsym
(
libgnutls_handle
,
"gnutls_pk_to_sign"
)))
{
WARN
(
"gnutls_pk_to_sign not found
\n
"
);
pgnutls_pk_to_sign
=
compat_gnutls_pk_to_sign
;
}
if
(
!
(
pgnutls_pubkey_verify_hash2
=
dlsym
(
libgnutls_handle
,
"gnutls_pubkey_verify_hash2"
)))
{
WARN
(
"gnutls_pubkey_verify_hash2 not found
\n
"
);
pgnutls_pubkey_verify_hash2
=
compat_gnutls_pubkey_verify_hash2
;
}
if
(
!
(
pgnutls_pubkey_import_rsa_raw
=
dlsym
(
libgnutls_handle
,
"gnutls_pubkey_import_rsa_raw"
)))
{
WARN
(
"gnutls_pubkey_import_rsa_raw not found
\n
"
);
pgnutls_pubkey_import_rsa_raw
=
compat_gnutls_pubkey_import_rsa_raw
;
}
if
(
!
(
pgnutls_pubkey_import_dsa_raw
=
dlsym
(
libgnutls_handle
,
"gnutls_pubkey_import_dsa_raw"
)))
{
WARN
(
"gnutls_pubkey_import_dsa_raw not found
\n
"
);
pgnutls_pubkey_import_dsa_raw
=
compat_gnutls_pubkey_import_dsa_raw
;
}
if
(
!
(
pgnutls_privkey_generate
=
dlsym
(
libgnutls_handle
,
"gnutls_privkey_generate"
)))
{
WARN
(
"gnutls_privkey_generate not found
\n
"
);
pgnutls_privkey_generate
=
compat_gnutls_privkey_generate
;
}
if
(
!
(
pgnutls_decode_rs_value
=
dlsym
(
libgnutls_handle
,
"gnutls_decode_rs_value"
)))
{
WARN
(
"gnutls_decode_rs_value not found
\n
"
);
pgnutls_decode_rs_value
=
compat_gnutls_decode_rs_value
;
}
if
(
!
(
pgnutls_privkey_import_rsa_raw
=
dlsym
(
libgnutls_handle
,
"gnutls_privkey_import_rsa_raw"
)))
{
WARN
(
"gnutls_privkey_import_rsa_raw not found
\n
"
);
pgnutls_privkey_import_rsa_raw
=
compat_gnutls_privkey_import_rsa_raw
;
}
if
(
!
(
pgnutls_privkey_decrypt_data
=
dlsym
(
libgnutls_handle
,
"gnutls_privkey_decrypt_data"
)))
{
WARN
(
"gnutls_privkey_decrypt_data not found
\n
"
);
pgnutls_privkey_decrypt_data
=
compat_gnutls_privkey_decrypt_data
;
}
if
(
TRACE_ON
(
bcrypt
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment