diff options
| author | Kevin Coffman <kwc@citi.umich.edu> | 2010-03-17 13:02:54 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-05-14 15:09:17 -0400 |
| commit | 47d84807762966c3611c38adecec6ea703ddda7a (patch) | |
| tree | ac67fb9e29aa03e7eba58adae29e8db05fd35537 /include | |
| parent | 4891f2d008e4343eedea39ba1fe74864f1d32be0 (diff) | |
gss_krb5: handle new context format from gssd
For encryption types other than DES, gssd sends down context information
in a new format. This new format includes the information needed to
support the new Kerberos GSS-API tokens defined in rfc4121.
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 'include')
| -rw-r--r-- | include/linux/sunrpc/gss_krb5.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h index d31ba0304d18..04d5279f17df 100644 --- a/include/linux/sunrpc/gss_krb5.h +++ b/include/linux/sunrpc/gss_krb5.h | |||
| @@ -72,21 +72,36 @@ struct gss_krb5_enctype { | |||
| 72 | u32 (*decrypt) (struct crypto_blkcipher *tfm, | 72 | u32 (*decrypt) (struct crypto_blkcipher *tfm, |
| 73 | void *iv, void *in, void *out, | 73 | void *iv, void *in, void *out, |
| 74 | int length); /* decryption function */ | 74 | int length); /* decryption function */ |
| 75 | u32 (*mk_key) (struct gss_krb5_enctype *gk5e, | 75 | u32 (*mk_key) (const struct gss_krb5_enctype *gk5e, |
| 76 | struct xdr_netobj *in, | 76 | struct xdr_netobj *in, |
| 77 | struct xdr_netobj *out); /* complete key generation */ | 77 | struct xdr_netobj *out); /* complete key generation */ |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | /* krb5_ctx flags definitions */ | ||
| 81 | #define KRB5_CTX_FLAG_INITIATOR 0x00000001 | ||
| 82 | #define KRB5_CTX_FLAG_CFX 0x00000002 | ||
| 83 | #define KRB5_CTX_FLAG_ACCEPTOR_SUBKEY 0x00000004 | ||
| 84 | |||
| 80 | struct krb5_ctx { | 85 | struct krb5_ctx { |
| 81 | int initiate; /* 1 = initiating, 0 = accepting */ | 86 | int initiate; /* 1 = initiating, 0 = accepting */ |
| 82 | u32 enctype; | 87 | u32 enctype; |
| 88 | u32 flags; | ||
| 83 | const struct gss_krb5_enctype *gk5e; /* enctype-specific info */ | 89 | const struct gss_krb5_enctype *gk5e; /* enctype-specific info */ |
| 84 | struct crypto_blkcipher *enc; | 90 | struct crypto_blkcipher *enc; |
| 85 | struct crypto_blkcipher *seq; | 91 | struct crypto_blkcipher *seq; |
| 92 | struct crypto_blkcipher *acceptor_enc; | ||
| 93 | struct crypto_blkcipher *initiator_enc; | ||
| 86 | u8 cksum[GSS_KRB5_MAX_KEYLEN]; | 94 | u8 cksum[GSS_KRB5_MAX_KEYLEN]; |
| 87 | s32 endtime; | 95 | s32 endtime; |
| 88 | u32 seq_send; | 96 | u32 seq_send; |
| 97 | u64 seq_send64; | ||
| 89 | struct xdr_netobj mech_used; | 98 | struct xdr_netobj mech_used; |
| 99 | u8 initiator_sign[GSS_KRB5_MAX_KEYLEN]; | ||
| 100 | u8 acceptor_sign[GSS_KRB5_MAX_KEYLEN]; | ||
| 101 | u8 initiator_seal[GSS_KRB5_MAX_KEYLEN]; | ||
| 102 | u8 acceptor_seal[GSS_KRB5_MAX_KEYLEN]; | ||
| 103 | u8 initiator_integ[GSS_KRB5_MAX_KEYLEN]; | ||
| 104 | u8 acceptor_integ[GSS_KRB5_MAX_KEYLEN]; | ||
| 90 | }; | 105 | }; |
| 91 | 106 | ||
| 92 | extern spinlock_t krb5_seq_lock; | 107 | extern spinlock_t krb5_seq_lock; |
| @@ -151,6 +166,10 @@ enum seal_alg { | |||
| 151 | #define ENCTYPE_DES3_CBC_RAW 0x0006 /* DES-3 cbc mode raw */ | 166 | #define ENCTYPE_DES3_CBC_RAW 0x0006 /* DES-3 cbc mode raw */ |
| 152 | #define ENCTYPE_DES_HMAC_SHA1 0x0008 | 167 | #define ENCTYPE_DES_HMAC_SHA1 0x0008 |
| 153 | #define ENCTYPE_DES3_CBC_SHA1 0x0010 | 168 | #define ENCTYPE_DES3_CBC_SHA1 0x0010 |
| 169 | #define ENCTYPE_AES128_CTS_HMAC_SHA1_96 0x0011 | ||
| 170 | #define ENCTYPE_AES256_CTS_HMAC_SHA1_96 0x0012 | ||
| 171 | #define ENCTYPE_ARCFOUR_HMAC 0x0017 | ||
| 172 | #define ENCTYPE_ARCFOUR_HMAC_EXP 0x0018 | ||
| 154 | #define ENCTYPE_UNKNOWN 0x01ff | 173 | #define ENCTYPE_UNKNOWN 0x01ff |
| 155 | 174 | ||
| 156 | /* | 175 | /* |
| @@ -238,7 +257,7 @@ int | |||
| 238 | xdr_extend_head(struct xdr_buf *buf, unsigned int base, unsigned int shiftlen); | 257 | xdr_extend_head(struct xdr_buf *buf, unsigned int base, unsigned int shiftlen); |
| 239 | 258 | ||
| 240 | u32 | 259 | u32 |
| 241 | krb5_derive_key(struct gss_krb5_enctype *gk5e, | 260 | krb5_derive_key(const struct gss_krb5_enctype *gk5e, |
| 242 | const struct xdr_netobj *inkey, | 261 | const struct xdr_netobj *inkey, |
| 243 | struct xdr_netobj *outkey, | 262 | struct xdr_netobj *outkey, |
| 244 | const struct xdr_netobj *in_constant); | 263 | const struct xdr_netobj *in_constant); |
