| OLD | NEW |
| 1 /* crypto/x509/x509_obj.c */ | 1 /* crypto/x509/x509_obj.c */ |
| 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
| 6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
| 7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
| 8 * | 8 * |
| 9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
| 10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) | 66 char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) |
| 67 { | 67 { |
| 68 X509_NAME_ENTRY *ne; | 68 X509_NAME_ENTRY *ne; |
| 69 int i; | 69 int i; |
| 70 int n,lold,l,l1,l2,num,j,type; | 70 int n,lold,l,l1,l2,num,j,type; |
| 71 const char *s; | 71 const char *s; |
| 72 char *p; | 72 char *p; |
| 73 unsigned char *q; | 73 unsigned char *q; |
| 74 BUF_MEM *b=NULL; | 74 BUF_MEM *b=NULL; |
| 75 » static char hex[17]="0123456789ABCDEF"; | 75 » static const char hex[17]="0123456789ABCDEF"; |
| 76 int gs_doit[4]; | 76 int gs_doit[4]; |
| 77 char tmp_buf[80]; | 77 char tmp_buf[80]; |
| 78 #ifdef CHARSET_EBCDIC | 78 #ifdef CHARSET_EBCDIC |
| 79 char ebcdic_buf[1024]; | 79 char ebcdic_buf[1024]; |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 if (buf == NULL) | 82 if (buf == NULL) |
| 83 { | 83 { |
| 84 if ((b=BUF_MEM_new()) == NULL) goto err; | 84 if ((b=BUF_MEM_new()) == NULL) goto err; |
| 85 if (!BUF_MEM_grow(b,200)) goto err; | 85 if (!BUF_MEM_grow(b,200)) goto err; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 p=buf; | 217 p=buf; |
| 218 if (i == 0) | 218 if (i == 0) |
| 219 *p = '\0'; | 219 *p = '\0'; |
| 220 return(p); | 220 return(p); |
| 221 err: | 221 err: |
| 222 X509err(X509_F_X509_NAME_ONELINE,ERR_R_MALLOC_FAILURE); | 222 X509err(X509_F_X509_NAME_ONELINE,ERR_R_MALLOC_FAILURE); |
| 223 if (b != NULL) BUF_MEM_free(b); | 223 if (b != NULL) BUF_MEM_free(b); |
| 224 return(NULL); | 224 return(NULL); |
| 225 } | 225 } |
| 226 | 226 |
| OLD | NEW |