%module M2Crypto_ext %include %include "constraints.i" %{ #include %} %apply Pointer NONNULL { X509_REQ * }; %inline %{ STACK_OF(X509_EXTENSIO) *x509_req_get_extensions(X509_REQ *req) { return X509_REQ_get_extensions(req); } %}