summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509')
-rw-r--r--src/lib/libcrypto/x509/x509_cmp.c4
-rw-r--r--src/lib/libcrypto/x509/x509_set.c8
-rw-r--r--src/lib/libcrypto/x509/x509_v3.c4
-rw-r--r--src/lib/libcrypto/x509/x509cset.c10
4 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libcrypto/x509/x509_cmp.c b/src/lib/libcrypto/x509/x509_cmp.c
index 030e29bde7..407e1e07ad 100644
--- a/src/lib/libcrypto/x509/x509_cmp.c
+++ b/src/lib/libcrypto/x509/x509_cmp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_cmp.c,v 1.25 2014/09/26 19:31:09 miod Exp $ */ 1/* $OpenBSD: x509_cmp.c,v 1.26 2015/07/29 14:58:34 jsing Exp $ */
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 *
@@ -76,7 +76,7 @@ X509_issuer_and_serial_cmp(const X509 *a, const X509 *b)
76 76
77 ai = a->cert_info; 77 ai = a->cert_info;
78 bi = b->cert_info; 78 bi = b->cert_info;
79 i = M_ASN1_INTEGER_cmp(ai->serialNumber, bi->serialNumber); 79 i = ASN1_STRING_cmp(ai->serialNumber, bi->serialNumber);
80 if (i) 80 if (i)
81 return (i); 81 return (i);
82 return (X509_NAME_cmp(ai->issuer, bi->issuer)); 82 return (X509_NAME_cmp(ai->issuer, bi->issuer));
diff --git a/src/lib/libcrypto/x509/x509_set.c b/src/lib/libcrypto/x509/x509_set.c
index 3be557cbc0..c6160b90b0 100644
--- a/src/lib/libcrypto/x509/x509_set.c
+++ b/src/lib/libcrypto/x509/x509_set.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_set.c,v 1.9 2014/07/11 08:44:49 jsing Exp $ */ 1/* $OpenBSD: x509_set.c,v 1.10 2015/07/29 14:58:34 jsing Exp $ */
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 *
@@ -84,7 +84,7 @@ X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial)
84 return (0); 84 return (0);
85 in = x->cert_info->serialNumber; 85 in = x->cert_info->serialNumber;
86 if (in != serial) { 86 if (in != serial) {
87 in = M_ASN1_INTEGER_dup(serial); 87 in = ASN1_STRING_dup(serial);
88 if (in != NULL) { 88 if (in != NULL) {
89 M_ASN1_INTEGER_free(x->cert_info->serialNumber); 89 M_ASN1_INTEGER_free(x->cert_info->serialNumber);
90 x->cert_info->serialNumber = in; 90 x->cert_info->serialNumber = in;
@@ -118,7 +118,7 @@ X509_set_notBefore(X509 *x, const ASN1_TIME *tm)
118 return (0); 118 return (0);
119 in = x->cert_info->validity->notBefore; 119 in = x->cert_info->validity->notBefore;
120 if (in != tm) { 120 if (in != tm) {
121 in = M_ASN1_TIME_dup(tm); 121 in = ASN1_STRING_dup(tm);
122 if (in != NULL) { 122 if (in != NULL) {
123 M_ASN1_TIME_free(x->cert_info->validity->notBefore); 123 M_ASN1_TIME_free(x->cert_info->validity->notBefore);
124 x->cert_info->validity->notBefore = in; 124 x->cert_info->validity->notBefore = in;
@@ -136,7 +136,7 @@ X509_set_notAfter(X509 *x, const ASN1_TIME *tm)
136 return (0); 136 return (0);
137 in = x->cert_info->validity->notAfter; 137 in = x->cert_info->validity->notAfter;
138 if (in != tm) { 138 if (in != tm) {
139 in = M_ASN1_TIME_dup(tm); 139 in = ASN1_STRING_dup(tm);
140 if (in != NULL) { 140 if (in != NULL) {
141 M_ASN1_TIME_free(x->cert_info->validity->notAfter); 141 M_ASN1_TIME_free(x->cert_info->validity->notAfter);
142 x->cert_info->validity->notAfter = in; 142 x->cert_info->validity->notAfter = in;
diff --git a/src/lib/libcrypto/x509/x509_v3.c b/src/lib/libcrypto/x509/x509_v3.c
index 3d3a96f59b..a9f3fdb10e 100644
--- a/src/lib/libcrypto/x509/x509_v3.c
+++ b/src/lib/libcrypto/x509/x509_v3.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_v3.c,v 1.11 2014/09/28 10:53:57 miod Exp $ */ 1/* $OpenBSD: x509_v3.c,v 1.12 2015/07/29 14:58:34 jsing Exp $ */
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 *
@@ -267,7 +267,7 @@ X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data)
267 267
268 if (ex == NULL) 268 if (ex == NULL)
269 return (0); 269 return (0);
270 i = M_ASN1_OCTET_STRING_set(ex->value, data->data, data->length); 270 i = ASN1_STRING_set(ex->value, data->data, data->length);
271 if (!i) 271 if (!i)
272 return (0); 272 return (0);
273 return (1); 273 return (1);
diff --git a/src/lib/libcrypto/x509/x509cset.c b/src/lib/libcrypto/x509/x509cset.c
index a4442632f6..94c419301a 100644
--- a/src/lib/libcrypto/x509/x509cset.c
+++ b/src/lib/libcrypto/x509/x509cset.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509cset.c,v 1.8 2014/07/11 08:44:49 jsing Exp $ */ 1/* $OpenBSD: x509cset.c,v 1.9 2015/07/29 14:58:34 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -92,7 +92,7 @@ X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm)
92 return (0); 92 return (0);
93 in = x->crl->lastUpdate; 93 in = x->crl->lastUpdate;
94 if (in != tm) { 94 if (in != tm) {
95 in = M_ASN1_TIME_dup(tm); 95 in = ASN1_STRING_dup(tm);
96 if (in != NULL) { 96 if (in != NULL) {
97 M_ASN1_TIME_free(x->crl->lastUpdate); 97 M_ASN1_TIME_free(x->crl->lastUpdate);
98 x->crl->lastUpdate = in; 98 x->crl->lastUpdate = in;
@@ -110,7 +110,7 @@ X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm)
110 return (0); 110 return (0);
111 in = x->crl->nextUpdate; 111 in = x->crl->nextUpdate;
112 if (in != tm) { 112 if (in != tm) {
113 in = M_ASN1_TIME_dup(tm); 113 in = ASN1_STRING_dup(tm);
114 if (in != NULL) { 114 if (in != NULL) {
115 M_ASN1_TIME_free(x->crl->nextUpdate); 115 M_ASN1_TIME_free(x->crl->nextUpdate);
116 x->crl->nextUpdate = in; 116 x->crl->nextUpdate = in;
@@ -145,7 +145,7 @@ X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm)
145 return (0); 145 return (0);
146 in = x->revocationDate; 146 in = x->revocationDate;
147 if (in != tm) { 147 if (in != tm) {
148 in = M_ASN1_TIME_dup(tm); 148 in = ASN1_STRING_dup(tm);
149 if (in != NULL) { 149 if (in != NULL) {
150 M_ASN1_TIME_free(x->revocationDate); 150 M_ASN1_TIME_free(x->revocationDate);
151 x->revocationDate = in; 151 x->revocationDate = in;
@@ -163,7 +163,7 @@ X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial)
163 return (0); 163 return (0);
164 in = x->serialNumber; 164 in = x->serialNumber;
165 if (in != serial) { 165 if (in != serial) {
166 in = M_ASN1_INTEGER_dup(serial); 166 in = ASN1_STRING_dup(serial);
167 if (in != NULL) { 167 if (in != NULL) {
168 M_ASN1_INTEGER_free(x->serialNumber); 168 M_ASN1_INTEGER_free(x->serialNumber);
169 x->serialNumber = in; 169 x->serialNumber = in;