summaryrefslogtreecommitdiffstats
path: root/test/asn1test.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2010-01-16 13:32:14 +0000
committerBen Laurie <ben@openssl.org>2010-01-16 13:32:14 +0000
commit9e198c4bd078135af25d466d01cbac2f7c6b17f7 (patch)
tree2f13ee2b37247bc5b7a6e9cb7100f3519d68a498 /test/asn1test.c
parent7eceffbfefe561bfba2edbdc60c041d236af9c85 (diff)
Fix type-checking/casting issue.
Diffstat (limited to 'test/asn1test.c')
-rwxr-xr-xtest/asn1test.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/asn1test.c b/test/asn1test.c
new file mode 100755
index 0000000000..9f53d80344
--- /dev/null
+++ b/test/asn1test.c
@@ -0,0 +1,22 @@
+#include <openssl/x509.h>
+#include <openssl/asn1_mac.h>
+
+typedef struct X
+ {
+ STACK_OF(X509_EXTENSION) *ext;
+ } X;
+
+/* This isn't meant to run particularly, it's just to test type checking */
+int main(int argc, char **argv)
+ {
+ X *x = NULL;
+ unsigned char **pp = NULL;
+
+ M_ASN1_I2D_vars(x);
+ M_ASN1_I2D_len_SEQUENCE_opt_type(X509_EXTENSION, x->ext,
+ i2d_X509_EXTENSION);
+ M_ASN1_I2D_seq_total();
+ M_ASN1_I2D_put_SEQUENCE_opt_type(X509_EXTENSION, x->ext,
+ i2d_X509_EXTENSION);
+ M_ASN1_I2D_finish();
+ }