sequence of pa_data elements
krb5_decode.c (decode_krb5_padata_sequence): New function which decodes a
sequence of pa_data elements.
asn1_k_encode.c (asn1_encode_sequence_of_pa_data): Make it possible to encode
sequence of zero pa_data elements.
asn1_k_decode.c (decode_array_body): Make it possible to decode SEQUENCE OF
encodinges of zero items (which is legal according to ASN.1)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6593
dc483132-0cff-0310-8789-
dd5450dbe970
+Fri Aug 25 21:43:42 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * krb5_encode.c (encode_krb5_padata_sequence): New function which
+ encodes a sequence of pa_data elements
+
+ * krb5_decode.c (decode_krb5_padata_sequence): New function which
+ decodes a sequence of pa_data elements.
+
+ * asn1_k_encode.c (asn1_encode_sequence_of_pa_data): Make it
+ possible to encode sequence of zero pa_data elements.
+
+ * asn1_k_decode.c (decode_array_body): Make it possible to decode
+ SEQUENCE OF encodinges of zero items (which is legal
+ according to ASN.1)
+
Sat Jun 17 00:00:33 1995 Theodore Y. Ts'o (tytso@dcl)
* asn1_get.c (asn1_get_tag): Added change to allow for
get_element(elt,decoder);\
array_append(val,size,elt,type);\
}\
+ if (*val == NULL)\
+ *val = (type **)malloc(sizeof(type*));\
(*val)[size] = NULL;\
end_sequence_of(buf);\
}\
asn1_setup();
int i;
- if(val == NULL || val[0] == NULL) return ASN1_MISSING_FIELD;
+ if (val == NULL) return ASN1_MISSING_FIELD;
for(i=0; val[i] != NULL; i++);
for(i--; i>=0; i--){
end_structure (); }
cleanup();
}
+
+krb5_error_code decode_krb5_padata_sequence(code, rep)
+ const krb5_data * code;
+ krb5_pa_data ***rep;
+{
+ setup_buf_only();
+ *rep = 0;
+ retval = asn1_decode_sequence_of_pa_data(&buf,rep);
+ if(retval) return (krb5_error_code)retval;
+ cleanup();
+}
+
krb5_makeseq();
krb5_cleanup();
}
+
+krb5_error_code encode_krb5_padata_sequence(rep, code)
+ const krb5_pa_data ** rep;
+ krb5_data ** code;
+{
+ krb5_setup();
+
+ retval = asn1_encode_sequence_of_pa_data(buf,rep,&length);
+ if(retval) return retval;
+ sum += length;
+
+ krb5_cleanup();
+}
+