File snipl-sles15-openssl11.patch of Package snipl

Index: snipl-0.3.0.0/vmsmapi6.c
===================================================================
--- snipl-0.3.0.0.orig/vmsmapi6.c
+++ snipl-0.3.0.0/vmsmapi6.c
@@ -110,6 +110,7 @@ static int vm6_get_cert_attributes(struc
 				   char **name, char **fingerprint)
 {
 	unsigned char sha[EVP_MAX_MD_SIZE];
+	char subjectname[2048];
 	X509 *cert;
 	X509_NAME *certname;
 	int i;
@@ -151,7 +152,7 @@ static int vm6_get_cert_attributes(struc
 		pos += 3;
 	}
 	sprintf(&buffer[pos], "%02x", sha[i]);
-	*name = strdup(cert->name);
+	*name = strdup(X509_NAME_oneline(X509_get_subject_name(cert), subjectname, sizeof(subjectname)));
 
 	return 0;
 }
openSUSE Build Service is sponsored by