It seems that mktime does what is required here. Certainly timegm() can
[openssl.git] / crypto / asn1 / asn1_mac.h
index 93f9c5193c507e90f84d6d89fe1c948a4922f47a..653f5fe1c948ef599fc7c8d4702699855672b6e9 100644 (file)
 #ifndef HEADER_ASN1_MAC_H
 #define HEADER_ASN1_MAC_H
 
+#include <openssl/asn1.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <openssl/asn1.h>
-
 #ifndef ASN1_MAC_ERR_LIB
 #define ASN1_MAC_ERR_LIB       ERR_LIB_ASN1
 #endif 
@@ -106,6 +106,20 @@ err:\
 #define M_ASN1_D2I_start_sequence() \
        if (!asn1_GetSequence(&c,&length)) \
                { c.line=__LINE__; goto err; }
+/* Begin reading ASN1 without a surrounding sequence */
+#define M_ASN1_D2I_begin() \
+       c.slen = length;
+
+/* End reading ASN1 with no check on length */
+#define M_ASN1_D2I_Finish_nolen(a, func, e) \
+       *pp=c.p; \
+       if (a != NULL) (*a)=ret; \
+       return(ret); \
+err:\
+       ASN1_MAC_H_err((e),c.error,c.line); \
+       asn1_add_error(*pp,(int)(c.q- *pp)); \
+       if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \
+       return(NULL)
 
 #define M_ASN1_D2I_end_sequence() \
        (((c.inf&1) == 0)?(c.slen <= 0): \