Simplify DSA public key handling.
[oweals/openssl.git] / crypto / ts / ts_lib.c
index 089d5ea73a36dccd9f1c6cfd7bb61a978fb95103..cac9aa4a537d62a67b2a96b5ba6210eb86ff8fe0 100644 (file)
@@ -61,6 +61,7 @@
 #include "cryptlib.h"
 #include <openssl/objects.h>
 #include <openssl/bn.h>
+#include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #include <openssl/ts.h>
 
@@ -115,7 +116,7 @@ int TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions)
         BIO_printf(bio, ": %s\n", critical ? "critical" : "");
         if (!X509V3_EXT_print(bio, ex, 0, 4)) {
             BIO_printf(bio, "%4s", "");
-            M_ASN1_OCTET_STRING_print(bio, ex->value);
+            ASN1_STRING_print(bio, X509_EXTENSION_get_data(ex));
         }
         BIO_write(bio, "\n", 1);
     }
@@ -132,14 +133,14 @@ int TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg)
 
 int TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *a)
 {
-    const ASN1_OCTET_STRING *msg;
+    ASN1_OCTET_STRING *msg;
 
     TS_X509_ALGOR_print_bio(bio, TS_MSG_IMPRINT_get_algo(a));
 
     BIO_printf(bio, "Message data:\n");
     msg = TS_MSG_IMPRINT_get_msg(a);
-    BIO_dump_indent(bio, (const char *)M_ASN1_STRING_data(msg),
-                    M_ASN1_STRING_length(msg), 4);
+    BIO_dump_indent(bio, (const char *)ASN1_STRING_data(msg),
+                    ASN1_STRING_length(msg), 4);
 
     return 1;
 }