+#if PRT_EXT_DEBUG
+ yaz_log(YLOG_LOG, "odr_peektag OK tag=%d cons=%d zclass=%d what=%d",
+ tag, cons, zclass, type->what);
+#endif
+ if (zclass == ODR_CONTEXT && tag == 1 && cons == 0)
+ {
+ /* we have an OCTET STRING. decode BER contents from it */
+ const unsigned char *o_bp;
+ unsigned char *o_buf;
+ int o_size;
+ char *voidp = 0;
+ Odr_oct *oct;
+ int r;
+ if (!odr_implicit_tag(o, odr_octetstring, &oct,
+ ODR_CONTEXT, 1, 0, "octetaligned"))
+ return 0;
+
+ /* Save our decoding ODR members */
+ o_bp = o->bp;
+ o_buf = o->buf;
+ o_size = o->size;
+
+ /* Set up the OCTET STRING buffer */
+ o->bp = o->buf = oct->buf;
+ o->size = oct->len;
+
+ /* and decode that */
+ r = (*type->fun)(o, &voidp, 0, 0);
+ (*p)->which = type->what;
+ (*p)->u.single_ASN1_type = (Odr_any*) voidp;
+
+ /* Restore our decoding ODR member */
+ o->bp = o_bp;
+ o->buf = o_buf;
+ o->size = o_size;
+
+ return r && odr_sequence_end(o);
+ }