|
Lines 32-37
Link Here
|
| 32 |
*/ |
32 |
*/ |
| 33 |
|
33 |
|
| 34 |
#include "krb5_locl.h" |
34 |
#include "krb5_locl.h" |
|
|
35 |
#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) |
| 36 |
#include <openssl/provider.h> |
| 37 |
#endif |
| 35 |
|
38 |
|
| 36 |
/* coverity[+alloc : arg-*3] */ |
39 |
/* coverity[+alloc : arg-*3] */ |
| 37 |
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL |
40 |
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL |
|
Lines 43-48
krb5_salttype_to_string (krb5_context context,
Link Here
|
| 43 |
struct _krb5_encryption_type *e; |
46 |
struct _krb5_encryption_type *e; |
| 44 |
struct salt_type *st; |
47 |
struct salt_type *st; |
| 45 |
|
48 |
|
|
|
49 |
#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) |
| 50 |
if (OSSL_PROVIDER_load(NULL, "legacy") == NULL) |
| 51 |
return EINVAL; |
| 52 |
#endif |
| 53 |
|
| 46 |
e = _krb5_find_enctype (etype); |
54 |
e = _krb5_find_enctype (etype); |
| 47 |
if (e == NULL) { |
55 |
if (e == NULL) { |
| 48 |
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, |
56 |
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, |
|
Lines 75-80
krb5_string_to_salttype (krb5_context context,
Link Here
|
| 75 |
struct _krb5_encryption_type *e; |
83 |
struct _krb5_encryption_type *e; |
| 76 |
struct salt_type *st; |
84 |
struct salt_type *st; |
| 77 |
|
85 |
|
|
|
86 |
#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) |
| 87 |
if (OSSL_PROVIDER_load(NULL, "legacy") == NULL) |
| 88 |
return EINVAL; |
| 89 |
#endif |
| 90 |
|
| 78 |
e = _krb5_find_enctype (etype); |
91 |
e = _krb5_find_enctype (etype); |
| 79 |
if (e == NULL) { |
92 |
if (e == NULL) { |
| 80 |
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, |
93 |
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, |
|
Lines 196-201
krb5_string_to_key_data_salt_opaque (krb5_context context,
Link Here
|
| 196 |
enctype); |
209 |
enctype); |
| 197 |
return KRB5_PROG_ETYPE_NOSUPP; |
210 |
return KRB5_PROG_ETYPE_NOSUPP; |
| 198 |
} |
211 |
} |
|
|
212 |
#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) |
| 213 |
if (OSSL_PROVIDER_load(NULL, "legacy") == NULL) |
| 214 |
return EINVAL; |
| 215 |
#endif |
| 199 |
for(st = et->keytype->string_to_key; st && st->type; st++) |
216 |
for(st = et->keytype->string_to_key; st && st->type; st++) |
| 200 |
if(st->type == salt.salttype) |
217 |
if(st->type == salt.salttype) |
| 201 |
return (*st->string_to_key)(context, enctype, password, |
218 |
return (*st->string_to_key)(context, enctype, password, |