#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/err.h>
#include <openssl/asn1t.h>

typedef struct reqtest_st {
    GENERAL_NAME *badstring;
    ASN1_UTF8STRING *mystr;
} REQTEST;

DECLARE_ASN1_FUNCTIONS(REQTEST);

#define d2i_REQTEST_bio(bp,p) ASN1_d2i_bio_of(REQTEST, \
    REQTEST_new, \
    d2i_REQTEST, bp, p)

#define i2d_REQTEST_bio(bioptr, req) ASN1_i2d_bio_of(REQTEST, \
                i2d_REQTEST, bioptr, req)

typedef struct reqtest2_st {
    ASN1_UTF8STRING *badstring;
    ASN1_UTF8STRING *mystr;
} REQTEST2;

DECLARE_ASN1_FUNCTIONS(REQTEST2);

#define d2i_REQTEST2_bio(bp,p) ASN1_d2i_bio_of(REQTEST2, \
    REQTEST2_new, \
    d2i_REQTEST2, bp, p)

#define i2d_REQTEST2_bio(bioptr, req) ASN1_i2d_bio_of(REQTEST2, \
                i2d_REQTEST2, bioptr, req)
