parse a negTokenInit packet giving a GUID, a list of supported
OIDs (the mechanisms) and a principal name string
*/
-bool spnego_parse_negTokenInit(DATA_BLOB blob,
+bool spnego_parse_negTokenInit(TALLOC_CTX *ctx,
+ DATA_BLOB blob,
char *OIDs[ASN1_MAX_OIDS],
char **principal,
DATA_BLOB *secblob)
asn1_start_tag(data,ASN1_SEQUENCE(0));
for (i=0; asn1_tag_remaining(data) > 0 && i < ASN1_MAX_OIDS-1; i++) {
const char *oid_str = NULL;
- asn1_read_OID(data,talloc_autofree_context(),&oid_str);
+ asn1_read_OID(data,ctx,&oid_str);
OIDs[i] = CONST_DISCARD(char *, oid_str);
}
OIDs[i] = NULL;
DATA_BLOB sblob = data_blob_null;
/* mechToken [2] OCTET STRING OPTIONAL */
asn1_start_tag(data, ASN1_CONTEXT(2));
- asn1_read_OctetString(data, talloc_autofree_context(),
- &sblob);
+ asn1_read_OctetString(data, ctx, &sblob);
asn1_end_tag(data);
if (secblob) {
*secblob = sblob;
asn1_start_tag(data, ASN1_CONTEXT(3));
asn1_start_tag(data, ASN1_SEQUENCE(0));
asn1_start_tag(data, ASN1_CONTEXT(0));
- asn1_read_GeneralString(data,talloc_autofree_context(),
- &princ);
+ asn1_read_GeneralString(data, ctx, &princ);
asn1_end_tag(data);
asn1_end_tag(data);
asn1_end_tag(data);