Skip to content

Commit 84bf9ab

Browse files
Timothy Leggetimlegge
authored andcommitted
X509_NAME_add_entry_by_txt second parameter is const char
1 parent 35e1db5 commit 84bf9ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PKCS10.xs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ X509_NAME *parse_name(char *subject, long chtype, int multirdn)
5454
size_t buflen = strlen(subject)+1; /* to copy the types and values into. due to escaping, the copy can only become shorter */
5555
char *buf = OPENSSL_malloc(buflen);
5656
size_t max_ne = buflen / 2 + 1; /* maximum number of name elements */
57-
char **ne_types = OPENSSL_malloc(max_ne * sizeof (char *));
57+
const char **ne_types = OPENSSL_malloc(max_ne * sizeof (char *));
5858
char **ne_values = OPENSSL_malloc(max_ne * sizeof (char *));
5959
int *mval = OPENSSL_malloc (max_ne * sizeof (int));
6060

@@ -154,7 +154,7 @@ X509_NAME *parse_name(char *subject, long chtype, int multirdn)
154154
continue;
155155
}
156156

157-
if (!X509_NAME_add_entry_by_txt(n, (unsigned char*)ne_types[i], chtype, (unsigned char*)ne_values[i], -1,-1,mval[i]))
157+
if (!X509_NAME_add_entry_by_txt(n, ne_types[i], chtype, (unsigned char*)ne_values[i], -1,-1,mval[i]))
158158
goto error;
159159
}
160160

0 commit comments

Comments
 (0)