summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_att.c
diff options
context:
space:
mode:
authortb <>2024-08-31 10:46:40 +0000
committertb <>2024-08-31 10:46:40 +0000
commit1d2f824e57591d47f461d3ef7afa58b19d2091e7 (patch)
tree39b3f44146bb00c2c611ffa1e298dbea4a4634b8 /src/lib/libcrypto/x509/x509_att.c
parent21cf540d53146de578980b2ac00c1ba17009d853 (diff)
downloadopenbsd-1d2f824e57591d47f461d3ef7afa58b19d2091e7.tar.gz
openbsd-1d2f824e57591d47f461d3ef7afa58b19d2091e7.tar.bz2
openbsd-1d2f824e57591d47f461d3ef7afa58b19d2091e7.zip
Make X509at_* API internal
The only consumer, yara, has been adjusted. It will be some more work to remove this idiocy internally, but at least we will no longer have to care about external consumers. ok beck jsing
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/x509/x509_att.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/lib/libcrypto/x509/x509_att.c b/src/lib/libcrypto/x509/x509_att.c
index 21b47ce96f..4931cbbc17 100644
--- a/src/lib/libcrypto/x509/x509_att.c
+++ b/src/lib/libcrypto/x509/x509_att.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_att.c,v 1.24 2024/07/26 13:33:39 tb Exp $ */ 1/* $OpenBSD: x509_att.c,v 1.25 2024/08/31 10:46:40 tb 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 *
@@ -69,14 +69,6 @@
69#include "x509_local.h" 69#include "x509_local.h"
70 70
71int 71int
72X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x)
73{
74 X509error(ERR_R_DISABLED);
75 return 0;
76}
77LCRYPTO_ALIAS(X509at_get_attr_count);
78
79int
80X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, int lastpos) 72X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, int lastpos)
81{ 73{
82 ASN1_OBJECT *obj; 74 ASN1_OBJECT *obj;
@@ -86,7 +78,6 @@ X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, int lastpos)
86 return (-2); 78 return (-2);
87 return (X509at_get_attr_by_OBJ(x, obj, lastpos)); 79 return (X509at_get_attr_by_OBJ(x, obj, lastpos));
88} 80}
89LCRYPTO_ALIAS(X509at_get_attr_by_NID);
90 81
91int 82int
92X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, 83X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk,
@@ -108,23 +99,6 @@ X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk,
108 } 99 }
109 return (-1); 100 return (-1);
110} 101}
111LCRYPTO_ALIAS(X509at_get_attr_by_OBJ);
112
113X509_ATTRIBUTE *
114X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc)
115{
116 X509error(ERR_R_DISABLED);
117 return NULL;
118}
119LCRYPTO_ALIAS(X509at_get_attr);
120
121X509_ATTRIBUTE *
122X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc)
123{
124 X509error(ERR_R_DISABLED);
125 return NULL;
126}
127LCRYPTO_ALIAS(X509at_delete_attr);
128 102
129STACK_OF(X509_ATTRIBUTE) * 103STACK_OF(X509_ATTRIBUTE) *
130X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, X509_ATTRIBUTE *attr) 104X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, X509_ATTRIBUTE *attr)
@@ -160,7 +134,6 @@ err2:
160 sk_X509_ATTRIBUTE_free(sk); 134 sk_X509_ATTRIBUTE_free(sk);
161 return (NULL); 135 return (NULL);
162} 136}
163LCRYPTO_ALIAS(X509at_add1_attr);
164 137
165STACK_OF(X509_ATTRIBUTE) * 138STACK_OF(X509_ATTRIBUTE) *
166X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, const ASN1_OBJECT *obj, 139X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, const ASN1_OBJECT *obj,
@@ -176,7 +149,6 @@ X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, const ASN1_OBJECT *obj,
176 X509_ATTRIBUTE_free(attr); 149 X509_ATTRIBUTE_free(attr);
177 return ret; 150 return ret;
178} 151}
179LCRYPTO_ALIAS(X509at_add1_attr_by_OBJ);
180 152
181STACK_OF(X509_ATTRIBUTE) * 153STACK_OF(X509_ATTRIBUTE) *
182X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, int nid, int type, 154X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, int nid, int type,
@@ -192,7 +164,6 @@ X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, int nid, int type,
192 X509_ATTRIBUTE_free(attr); 164 X509_ATTRIBUTE_free(attr);
193 return ret; 165 return ret;
194} 166}
195LCRYPTO_ALIAS(X509at_add1_attr_by_NID);
196 167
197STACK_OF(X509_ATTRIBUTE) * 168STACK_OF(X509_ATTRIBUTE) *
198X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, const char *attrname, 169X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, const char *attrname,
@@ -208,7 +179,6 @@ X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, const char *attrname,
208 X509_ATTRIBUTE_free(attr); 179 X509_ATTRIBUTE_free(attr);
209 return ret; 180 return ret;
210} 181}
211LCRYPTO_ALIAS(X509at_add1_attr_by_txt);
212 182
213void * 183void *
214X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj, 184X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj,
@@ -227,7 +197,6 @@ X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj,
227 return NULL; 197 return NULL;
228 return X509_ATTRIBUTE_get0_data(at, 0, type, NULL); 198 return X509_ATTRIBUTE_get0_data(at, 0, type, NULL);
229} 199}
230LCRYPTO_ALIAS(X509at_get0_data_by_OBJ);
231 200
232X509_ATTRIBUTE * 201X509_ATTRIBUTE *
233X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, int atrtype, 202X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, int atrtype,