summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_pkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/evp_pkey.c')
-rw-r--r--src/lib/libcrypto/evp/evp_pkey.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp_pkey.c b/src/lib/libcrypto/evp/evp_pkey.c
index d2fbdee46c..31a59e2536 100644
--- a/src/lib/libcrypto/evp/evp_pkey.c
+++ b/src/lib/libcrypto/evp/evp_pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_pkey.c,v 1.25 2022/11/26 16:08:52 tb Exp $ */ 1/* $OpenBSD: evp_pkey.c,v 1.26 2023/07/07 13:54:45 beck 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 1999. 3 * project 1999.
4 */ 4 */
@@ -105,6 +105,7 @@ error:
105 EVP_PKEY_free(pkey); 105 EVP_PKEY_free(pkey);
106 return NULL; 106 return NULL;
107} 107}
108LCRYPTO_ALIAS(EVP_PKCS82PKEY);
108 109
109/* Turn a private key into a PKCS8 structure */ 110/* Turn a private key into a PKCS8 structure */
110 111
@@ -138,6 +139,7 @@ error:
138 PKCS8_PRIV_KEY_INFO_free(p8); 139 PKCS8_PRIV_KEY_INFO_free(p8);
139 return NULL; 140 return NULL;
140} 141}
142LCRYPTO_ALIAS(EVP_PKEY2PKCS8);
141 143
142/* EVP_PKEY attribute functions */ 144/* EVP_PKEY attribute functions */
143 145
@@ -146,12 +148,14 @@ EVP_PKEY_get_attr_count(const EVP_PKEY *key)
146{ 148{
147 return X509at_get_attr_count(key->attributes); 149 return X509at_get_attr_count(key->attributes);
148} 150}
151LCRYPTO_ALIAS(EVP_PKEY_get_attr_count);
149 152
150int 153int
151EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos) 154EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos)
152{ 155{
153 return X509at_get_attr_by_NID(key->attributes, nid, lastpos); 156 return X509at_get_attr_by_NID(key->attributes, nid, lastpos);
154} 157}
158LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_NID);
155 159
156int 160int
157EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, 161EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj,
@@ -159,18 +163,21 @@ EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj,
159{ 163{
160 return X509at_get_attr_by_OBJ(key->attributes, obj, lastpos); 164 return X509at_get_attr_by_OBJ(key->attributes, obj, lastpos);
161} 165}
166LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_OBJ);
162 167
163X509_ATTRIBUTE * 168X509_ATTRIBUTE *
164EVP_PKEY_get_attr(const EVP_PKEY *key, int loc) 169EVP_PKEY_get_attr(const EVP_PKEY *key, int loc)
165{ 170{
166 return X509at_get_attr(key->attributes, loc); 171 return X509at_get_attr(key->attributes, loc);
167} 172}
173LCRYPTO_ALIAS(EVP_PKEY_get_attr);
168 174
169X509_ATTRIBUTE * 175X509_ATTRIBUTE *
170EVP_PKEY_delete_attr(EVP_PKEY *key, int loc) 176EVP_PKEY_delete_attr(EVP_PKEY *key, int loc)
171{ 177{
172 return X509at_delete_attr(key->attributes, loc); 178 return X509at_delete_attr(key->attributes, loc);
173} 179}
180LCRYPTO_ALIAS(EVP_PKEY_delete_attr);
174 181
175int 182int
176EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) 183EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr)
@@ -179,6 +186,7 @@ EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr)
179 return 1; 186 return 1;
180 return 0; 187 return 0;
181} 188}
189LCRYPTO_ALIAS(EVP_PKEY_add1_attr);
182 190
183int 191int
184EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, 192EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type,
@@ -188,6 +196,7 @@ EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type,
188 return 1; 196 return 1;
189 return 0; 197 return 0;
190} 198}
199LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_OBJ);
191 200
192int 201int
193EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type, 202EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type,
@@ -197,6 +206,7 @@ EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type,
197 return 1; 206 return 1;
198 return 0; 207 return 0;
199} 208}
209LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_NID);
200 210
201int 211int
202EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, 212EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type,
@@ -207,3 +217,4 @@ EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type,
207 return 1; 217 return 1;
208 return 0; 218 return 0;
209} 219}
220LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_txt);