#define KRB5_PADATA_NONE 0
#define KRB5_PADATA_AP_REQ 1
#define KRB5_PADATA_TGS_REQ KRB5_PADATA_AP_REQ
-#define KRB5_PADATA_ENC_TIMESTAMPS 2
+#define KRB5_PADATA_ENC_TIMESTAMP 2
#define KRB5_PADATA_PW_SALT 3
#if 0 /* Not used */
#define KRB5_PADATA_ENC_ENCKEY 4 /* Key encrypted within itself */
#endif
-#define KRB5_PADATA_ENC_TIMESTAMP 5 /* timestamp encrypted in key */
-#define KRB5_PADATA_ENC_SECURID 6 /* SecurId passcode */
+#define KRB5_PADATA_ENC_UNIX_TIME 5 /* timestamp encrypted in key */
+#define KRB5_PADATA_ENC_SANDIA_SECURID 6 /* SecurId passcode */
#define KRB5_PADATA_SESAME 7 /* Sesame project */
#define KRB5_PADATA_OSF_DCE 8 /* OSF DCE */
#include <syslog.h>
static krb5_preauth_ops preauth_systems[] = {
-#if 0
{
- KRB5_PADATA_ENC_RANDOM,
- KRB5_PREAUTH_FLAGS_ENCRYPT,
- get_random_padata,
- verify_random_padata,
- },
-#endif
- {
- KRB5_PADATA_ENC_TIMESTAMP,
+ KRB5_PADATA_ENC_UNIX_TIME,
KRB5_PREAUTH_FLAGS_ENCRYPT,
- get_timestamp_padata,
- verify_timestamp_padata,
+ get_unixtime_padata,
+ verify_unixtime_padata,
},
{
- KRB5_PADATA_ENC_SECURID,
+ KRB5_PADATA_ENC_SANDIA_SECURID,
KRB5_PREAUTH_FLAGS_ENCRYPT | KRB5_PREAUTH_FLAGS_HARDWARE,
get_securid_padata,
verify_securid_padata,
int seeded = 0 ; /* Used by srand below */
krb5_error_code
-get_timestamp_padata(client, src_addr, pa_data)
+get_unixtime_padata(client, src_addr, pa_data)
krb5_principal client;
krb5_address **src_addr;
krb5_pa_data *pa_data;
}
krb5_error_code
-verify_timestamp_padata(client, src_addr, data)
+verify_unixtime_padata(client, src_addr, data)
krb5_principal client;
krb5_address **src_addr;
krb5_data *data;
return 0;
}
-#if 0
-krb5_error_code
-get_random_padata(client, src_addr, pa_data)
- krb5_principal client;
- krb5_address **src_addr;
- krb5_pa_data *pa_data;
-{
- char temp[MAX_PREAUTH_SIZE];
-
- srand(time(0));
- sprintf(temp, "%1u", rand() & 0x7fffffff);
- pa_data->length = strlen(temp) + 1;
- pa_data->contents = (unsigned char *) malloc(pa_data->length);
- if (!pa_data->contents)
- return(ENOMEM);
- memcpy(pa_data->contents, temp, pa_data->length);
- return(0);
-}
-
-krb5_error_code
-verify_random_padata(client, src_addr, data)
- krb5_principal client;
- krb5_address **src_addr;
- krb5_data *data;
-{
- if (atof(data->data) > 2147483637.0)
- return KRB5_PREAUTH_FAILED;
-
- return 0;
-}
-#endif
-
#ifdef KRBCONF_SECUREID
#include "sdcli.h"
#include "sdconf.c"
free(username);
return(KRB5_PREAUTH_FAILED);
}
+
#endif