diff options
author | Kevin Coffman <kwc@citi.umich.edu> | 2010-03-17 13:02:49 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-05-14 15:09:15 -0400 |
commit | 1ac3719a2214c545c7e19d34e272a148ca9a24f1 (patch) | |
tree | ae1a3f88f85aad50c03cd0960b3fbc392561c673 /net/sunrpc/auth_gss/gss_krb5_unseal.c | |
parent | 54ec3d462f3c2a3fe48a7bd592160bee31360087 (diff) |
gss_krb5: split up functions in preparation of adding new enctypes
Add encryption type to the krb5 context structure and use it to switch
to the correct functions depending on the encryption type.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_krb5_unseal.c')
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_unseal.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_unseal.c b/net/sunrpc/auth_gss/gss_krb5_unseal.c index ce6c247edad0..069d4b59807a 100644 --- a/net/sunrpc/auth_gss/gss_krb5_unseal.c +++ b/net/sunrpc/auth_gss/gss_krb5_unseal.c | |||
@@ -70,11 +70,10 @@ | |||
70 | /* read_token is a mic token, and message_buffer is the data that the mic was | 70 | /* read_token is a mic token, and message_buffer is the data that the mic was |
71 | * supposedly taken over. */ | 71 | * supposedly taken over. */ |
72 | 72 | ||
73 | u32 | 73 | static u32 |
74 | gss_verify_mic_kerberos(struct gss_ctx *gss_ctx, | 74 | gss_verify_mic_v1(struct krb5_ctx *ctx, |
75 | struct xdr_buf *message_buffer, struct xdr_netobj *read_token) | 75 | struct xdr_buf *message_buffer, struct xdr_netobj *read_token) |
76 | { | 76 | { |
77 | struct krb5_ctx *ctx = gss_ctx->internal_ctx_id; | ||
78 | int signalg; | 77 | int signalg; |
79 | int sealalg; | 78 | int sealalg; |
80 | char cksumdata[16]; | 79 | char cksumdata[16]; |
@@ -135,3 +134,19 @@ gss_verify_mic_kerberos(struct gss_ctx *gss_ctx, | |||
135 | 134 | ||
136 | return GSS_S_COMPLETE; | 135 | return GSS_S_COMPLETE; |
137 | } | 136 | } |
137 | |||
138 | u32 | ||
139 | gss_verify_mic_kerberos(struct gss_ctx *gss_ctx, | ||
140 | struct xdr_buf *message_buffer, | ||
141 | struct xdr_netobj *read_token) | ||
142 | { | ||
143 | struct krb5_ctx *ctx = gss_ctx->internal_ctx_id; | ||
144 | |||
145 | switch (ctx->enctype) { | ||
146 | default: | ||
147 | BUG(); | ||
148 | case ENCTYPE_DES_CBC_RAW: | ||
149 | return gss_verify_mic_v1(ctx, message_buffer, read_token); | ||
150 | } | ||
151 | } | ||
152 | |||