Support routines for ASN1 scanning function, doesn't do much yet.
[openssl.git] / crypto / asn1 / asn1_locl.h
index 9fcf0d9530ff9a82dc008d45b537fda2c9ead109..c4c0c9d41e28e645bac49c08146abe3d47f19c95 100644 (file)
@@ -69,6 +69,32 @@ struct asn1_pctx_st
        unsigned long str_flags;
        } /* ASN1_PCTX */;
 
+/* ASN1 scan context structure */
+
+struct asn1_sctx_st
+       {
+       /* The ASN1_ITEM associated with this field */
+       const ASN1_ITEM *it;
+       /* If ASN1_TEMPLATE associated with this field */
+       const ASN1_TEMPLATE *tt;
+       /* Various flags associated with field and context */
+       unsigned long flags;
+       /* If SEQUENCE OF or SET OF, field index */
+       int skidx;
+       /* ASN1 depth of field */
+       int depth;
+       /* Structure and field name */
+       const char *sname, *fname;
+       /* If a primitive type the type of underlying field */
+       int prim_type;
+       /* The field value itself */
+       ASN1_VALUE **field;
+       /* Callback to pass information to */
+       int (*scan_cb)(ASN1_SCTX *ctx);
+       /* Context specific application data */
+       void *app_data;
+       } /* ASN1_SCTX */;
+
 /* ASN1 public key method structure */
 
 struct evp_pkey_asn1_method_st