asn1test.c 593 B

123456789101112131415161718192021
  1. #include <openssl/x509.h>
  2. #include <openssl/asn1_mac.h>
  3. typedef struct X {
  4. STACK_OF(X509_EXTENSION) *ext;
  5. } X;
  6. /* This isn't meant to run particularly, it's just to test type checking */
  7. int main(int argc, char **argv)
  8. {
  9. X *x = NULL;
  10. unsigned char **pp = NULL;
  11. M_ASN1_I2D_vars(x);
  12. M_ASN1_I2D_len_SEQUENCE_opt_type(X509_EXTENSION, x->ext,
  13. i2d_X509_EXTENSION);
  14. M_ASN1_I2D_seq_total();
  15. M_ASN1_I2D_put_SEQUENCE_opt_type(X509_EXTENSION, x->ext,
  16. i2d_X509_EXTENSION);
  17. M_ASN1_I2D_finish();
  18. }