Update PKCS#7 enveloped data to new API.
[openssl.git] / crypto / asn1 / asn1_lib.c
index 69ad869c971957e945106e73f35212097eb45084..41e1126e7710423735e16d70eb04bb96786bcf7b 100644 (file)
@@ -393,6 +393,14 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
        return(1);
        }
 
+void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len)
+       {
+       if (str->data)
+               OPENSSL_free(str->data);
+       str->data = data;
+       str->length = len;
+       }
+
 ASN1_STRING *ASN1_STRING_new(void)
        {
        return(ASN1_STRING_type_new(V_ASN1_OCTET_STRING));