diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2008-10-06 20:25:45 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2008-10-06 20:25:45 +0000 |
| commit | a7735754e826b831e8249cfb31718699d164ceed (patch) | |
| tree | 35e56827db4f44c3c55c72871bef75b2c2b70ed5 /src/lib | |
| parent | 3fa2e4f2a79729357db7b3d91229b8da4dd4ac4f (diff) | |
| download | krb5-a7735754e826b831e8249cfb31718699d164ceed.tar.gz krb5-a7735754e826b831e8249cfb31718699d164ceed.tar.xz krb5-a7735754e826b831e8249cfb31718699d164ceed.zip | |
Change LDAP key-sequence encoder to use a single data structure
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20829 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/asn.1/ldap_key_seq.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/lib/krb5/asn.1/ldap_key_seq.c b/src/lib/krb5/asn.1/ldap_key_seq.c index 7f0355d9f..1d48f9b57 100644 --- a/src/lib/krb5/asn.1/ldap_key_seq.c +++ b/src/lib/krb5/asn.1/ldap_key_seq.c @@ -133,11 +133,11 @@ last: /* Major version and minor version are both '1' - first version */ /* asn1_error_code asn1_encode_sequence_of_keys (krb5_key_data *key_data, */ krb5_error_code -asn1_encode_sequence_of_keys (krb5_key_data *key_data, - krb5_int16 n_key_data, - krb5_int32 mkvno, /* Master key version number */ - krb5_data **code) +asn1_encode_sequence_of_keys (ldap_seqof_key_data *val, krb5_data **code) { + krb5_key_data *key_data = val->key_data; + krb5_int16 n_key_data = val->n_key_data; + krb5_int32 mkvno = val->mkvno; asn1_error_code ret = 0; asn1buf *buf = NULL; unsigned int length, sum = 0; @@ -392,10 +392,13 @@ last: /* asn1_error_code asn1_decode_sequence_of_keys (krb5_data *in, */ krb5_error_code asn1_decode_sequence_of_keys (krb5_data *in, - krb5_key_data **out, - krb5_int16 *n_key_data, - int *mkvno) + ldap_seqof_key_data **rep) { + ldap_seqof_key_data *repval; + krb5_key_data **out; + krb5_int16 *n_key_data; + int *mkvno; + asn1_error_code ret; asn1buf buf, subbuf; int seqindef; @@ -404,6 +407,12 @@ krb5_error_code asn1_decode_sequence_of_keys (krb5_data *in, int kvno, maj, min; long lval; + repval = calloc(1,sizeof(ldap_seqof_key_data)); + *rep = repval; + out = &repval->key_data; + n_key_data = &repval->n_key_data; + mkvno = &repval->mkvno; + *n_key_data = 0; *out = NULL; |
