summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-10-12 04:54:53 +0000
committerAndrew Tridgell <tridge@samba.org>2001-10-12 04:54:53 +0000
commitd726eb216ad431d2bbd4ee07f4098b72446cdca2 (patch)
tree5d021eadc682c91d58f238ef465e1cf07b14f75a /source3/libsmb
parent9f7cb41f11c0d2fc09104f6998f75c59bc363b26 (diff)
downloadsamba-d726eb216ad431d2bbd4ee07f4098b72446cdca2.tar.gz
samba-d726eb216ad431d2bbd4ee07f4098b72446cdca2.tar.bz2
samba-d726eb216ad431d2bbd4ee07f4098b72446cdca2.zip
moved some OIDs to the ASN.1 header
(This used to be commit 7092beef9d7a68018ede569883b22c822300c7ff)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c4
-rw-r--r--source3/libsmb/clispnego.c8
2 files changed, 4 insertions, 8 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 11852a09cc..9186208d62 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -406,7 +406,7 @@ do a spnego/NTLMSSP encrypted session setup
static BOOL cli_session_setup_ntlmssp(struct cli_state *cli, char *user,
char *pass, char *workgroup)
{
- const char *mechs[] = {"1 3 6 1 4 1 311 2 2 10", NULL};
+ const char *mechs[] = {OID_NTLMSSP, NULL};
DATA_BLOB msg1;
DATA_BLOB blob, chal1, chal2, auth;
uint8 challenge[8];
@@ -502,7 +502,7 @@ static BOOL cli_session_setup_spnego(struct cli_state *cli, char *user,
/* make sure the server understands kerberos */
for (i=0;OIDs[i];i++) {
DEBUG(3,("got OID=%s\n", OIDs[i]));
- if (strcmp(OIDs[i], "1 2 840 48018 1 2 2") == 0) {
+ if (strcmp(OIDs[i], OID_KERBEROS5_OLD) == 0) {
got_kerberos_mechanism = True;
}
free(OIDs[i]);
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 6c6b18a923..6b705658c3 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -21,9 +21,6 @@
#include "includes.h"
-#define OID_SPNEGO "1 3 6 1 5 5 2"
-#define OID_KERBEROS5 "1 2 840 113554 1 2 2"
-
/*
generate a negTokenInit packet given a GUID, a list of supported
OIDs (the mechanisms) and a principle name string
@@ -207,8 +204,7 @@ DATA_BLOB spnego_gen_negTokenTarg(struct cli_state *cli, char *principle)
fstring service;
char *realm;
DATA_BLOB tkt, tkt_wrapped, targ;
- const char *krb_mechs[] =
- {"1 2 840 48018 1 2 2", "1 3 6 1 4 1 311 2 2 10", NULL};
+ const char *krb_mechs[] = {OID_KERBEROS5_OLD, OID_NTLMSSP, NULL};
fstrcpy(service, principle);
p = strchr_m(service, '@');
@@ -254,7 +250,7 @@ BOOL spnego_parse_challenge(DATA_BLOB blob,
asn1_end_tag(&data);
asn1_start_tag(&data,ASN1_CONTEXT(1));
- asn1_check_OID(&data, "1 3 6 1 4 1 311 2 2 10");
+ asn1_check_OID(&data, OID_NTLMSSP);
asn1_end_tag(&data);
asn1_start_tag(&data,ASN1_CONTEXT(2));