salt.c (3091cdb11fb05e554a54710116be87ee1f55c287) salt.c (476d63e091c2e663b51d18acf6acb282e1f22bbc)
1/*
2 * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 29 unchanged lines hidden (view full) ---

38krb5_salttype_to_string (krb5_context context,
39 krb5_enctype etype,
40 krb5_salttype stype,
41 char **string)
42{
43 struct _krb5_encryption_type *e;
44 struct salt_type *st;
45
1/*
2 * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 29 unchanged lines hidden (view full) ---

38krb5_salttype_to_string (krb5_context context,
39 krb5_enctype etype,
40 krb5_salttype stype,
41 char **string)
42{
43 struct _krb5_encryption_type *e;
44 struct salt_type *st;
45
46 (void) fbsd_ossl_provider_load();
47
46 e = _krb5_find_enctype (etype);
47 if (e == NULL) {
48 krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
49 "encryption type %d not supported",
50 etype);
51 return KRB5_PROG_ETYPE_NOSUPP;
52 }
53 for (st = e->keytype->string_to_key; st && st->type; st++) {

--- 16 unchanged lines hidden (view full) ---

70krb5_string_to_salttype (krb5_context context,
71 krb5_enctype etype,
72 const char *string,
73 krb5_salttype *salttype)
74{
75 struct _krb5_encryption_type *e;
76 struct salt_type *st;
77
48 e = _krb5_find_enctype (etype);
49 if (e == NULL) {
50 krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
51 "encryption type %d not supported",
52 etype);
53 return KRB5_PROG_ETYPE_NOSUPP;
54 }
55 for (st = e->keytype->string_to_key; st && st->type; st++) {

--- 16 unchanged lines hidden (view full) ---

72krb5_string_to_salttype (krb5_context context,
73 krb5_enctype etype,
74 const char *string,
75 krb5_salttype *salttype)
76{
77 struct _krb5_encryption_type *e;
78 struct salt_type *st;
79
80 (void) fbsd_ossl_provider_load();
81
78 e = _krb5_find_enctype (etype);
79 if (e == NULL) {
80 krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
81 N_("encryption type %d not supported", ""),
82 etype);
83 return KRB5_PROG_ETYPE_NOSUPP;
84 }
85 for (st = e->keytype->string_to_key; st && st->type; st++) {

--- 105 unchanged lines hidden (view full) ---

191 struct _krb5_encryption_type *et =_krb5_find_enctype(enctype);
192 struct salt_type *st;
193 if(et == NULL) {
194 krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
195 N_("encryption type %d not supported", ""),
196 enctype);
197 return KRB5_PROG_ETYPE_NOSUPP;
198 }
82 e = _krb5_find_enctype (etype);
83 if (e == NULL) {
84 krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
85 N_("encryption type %d not supported", ""),
86 etype);
87 return KRB5_PROG_ETYPE_NOSUPP;
88 }
89 for (st = e->keytype->string_to_key; st && st->type; st++) {

--- 105 unchanged lines hidden (view full) ---

195 struct _krb5_encryption_type *et =_krb5_find_enctype(enctype);
196 struct salt_type *st;
197 if(et == NULL) {
198 krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
199 N_("encryption type %d not supported", ""),
200 enctype);
201 return KRB5_PROG_ETYPE_NOSUPP;
202 }
203 (void) fbsd_ossl_provider_load();
199 for(st = et->keytype->string_to_key; st && st->type; st++)
200 if(st->type == salt.salttype)
201 return (*st->string_to_key)(context, enctype, password,
202 salt, opaque, key);
203 krb5_set_error_message(context, HEIM_ERR_SALTTYPE_NOSUPP,
204 N_("salt type %d not supported", ""),
205 salt.salttype);
206 return HEIM_ERR_SALTTYPE_NOSUPP;

--- 99 unchanged lines hidden ---
204 for(st = et->keytype->string_to_key; st && st->type; st++)
205 if(st->type == salt.salttype)
206 return (*st->string_to_key)(context, enctype, password,
207 salt, opaque, key);
208 krb5_set_error_message(context, HEIM_ERR_SALTTYPE_NOSUPP,
209 N_("salt type %d not supported", ""),
210 salt.salttype);
211 return HEIM_ERR_SALTTYPE_NOSUPP;

--- 99 unchanged lines hidden ---