evp.c
Go to the documentation of this file.
1 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
2  * All rights reserved.
3  *
4  * This package is an SSL implementation written
5  * by Eric Young (eay@cryptsoft.com).
6  * The implementation was written so as to conform with Netscapes SSL.
7  *
8  * This library is free for commercial and non-commercial use as long as
9  * the following conditions are aheared to. The following conditions
10  * apply to all code found in this distribution, be it the RC4, RSA,
11  * lhash, DES, etc., code; not just the SSL code. The SSL documentation
12  * included with this distribution is covered by the same copyright terms
13  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14  *
15  * Copyright remains Eric Young's, and as such any Copyright notices in
16  * the code are not to be removed.
17  * If this package is used in a product, Eric Young should be given attribution
18  * as the author of the parts of the library used.
19  * This can be in the form of a textual message at program startup or
20  * in documentation (online or textual) provided with the package.
21  *
22  * Redistribution and use in source and binary forms, with or without
23  * modification, are permitted provided that the following conditions
24  * are met:
25  * 1. Redistributions of source code must retain the copyright
26  * notice, this list of conditions and the following disclaimer.
27  * 2. Redistributions in binary form must reproduce the above copyright
28  * notice, this list of conditions and the following disclaimer in the
29  * documentation and/or other materials provided with the distribution.
30  * 3. All advertising materials mentioning features or use of this software
31  * must display the following acknowledgement:
32  * "This product includes cryptographic software written by
33  * Eric Young (eay@cryptsoft.com)"
34  * The word 'cryptographic' can be left out if the rouines from the library
35  * being used are not cryptographic related :-).
36  * 4. If you include any Windows specific code (or a derivative thereof) from
37  * the apps directory (application code) you must include an acknowledgement:
38  * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
39  *
40  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
41  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
44  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50  * SUCH DAMAGE.
51  *
52  * The licence and distribution terms for any publically available version or
53  * derivative of this code cannot be changed. i.e. this code cannot simply be
54  * copied and put under another distribution licence
55  * [including the GNU Public Licence.] */
56 
57 #include <openssl/evp.h>
58 
59 #include <assert.h>
60 #include <string.h>
61 
62 #include <openssl/dsa.h>
63 #include <openssl/ec.h>
64 #include <openssl/err.h>
65 #include <openssl/mem.h>
66 #include <openssl/nid.h>
67 #include <openssl/rsa.h>
68 #include <openssl/thread.h>
69 
70 #include "internal.h"
71 #include "../internal.h"
72 
73 
74 // Node depends on |EVP_R_NOT_XOF_OR_INVALID_LENGTH|.
75 //
76 // TODO(davidben): Fix Node to not touch the error queue itself and remove this.
77 OPENSSL_DECLARE_ERROR_REASON(EVP, NOT_XOF_OR_INVALID_LENGTH)
78 
79 // The HPKE module uses the EVP error namespace, but it lives in another
80 // directory.
81 OPENSSL_DECLARE_ERROR_REASON(EVP, EMPTY_PSK)
82 
84  EVP_PKEY *ret;
85 
86  ret = OPENSSL_malloc(sizeof(EVP_PKEY));
87  if (ret == NULL) {
89  return NULL;
90  }
91 
92  OPENSSL_memset(ret, 0, sizeof(EVP_PKEY));
93  ret->type = EVP_PKEY_NONE;
94  ret->references = 1;
95 
96  return ret;
97 }
98 
99 static void free_it(EVP_PKEY *pkey) {
100  if (pkey->ameth && pkey->ameth->pkey_free) {
101  pkey->ameth->pkey_free(pkey);
102  pkey->pkey.ptr = NULL;
103  pkey->type = EVP_PKEY_NONE;
104  }
105 }
106 
107 void EVP_PKEY_free(EVP_PKEY *pkey) {
108  if (pkey == NULL) {
109  return;
110  }
111 
113  return;
114  }
115 
116  free_it(pkey);
117  OPENSSL_free(pkey);
118 }
119 
122  return 1;
123 }
124 
125 int EVP_PKEY_is_opaque(const EVP_PKEY *pkey) {
126  if (pkey->ameth && pkey->ameth->pkey_opaque) {
127  return pkey->ameth->pkey_opaque(pkey);
128  }
129  return 0;
130 }
131 
132 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
133  if (a->type != b->type) {
134  return -1;
135  }
136 
137  if (a->ameth) {
138  int ret;
139  // Compare parameters if the algorithm has them
140  if (a->ameth->param_cmp) {
141  ret = a->ameth->param_cmp(a, b);
142  if (ret <= 0) {
143  return ret;
144  }
145  }
146 
147  if (a->ameth->pub_cmp) {
148  return a->ameth->pub_cmp(a, b);
149  }
150  }
151 
152  return -2;
153 }
154 
156  if (to->type != from->type) {
158  goto err;
159  }
160 
163  goto err;
164  }
165 
166  if (from->ameth && from->ameth->param_copy) {
167  return from->ameth->param_copy(to, from);
168  }
169 
170 err:
171  return 0;
172 }
173 
175  if (pkey->ameth && pkey->ameth->param_missing) {
176  return pkey->ameth->param_missing(pkey);
177  }
178  return 0;
179 }
180 
181 int EVP_PKEY_size(const EVP_PKEY *pkey) {
182  if (pkey && pkey->ameth && pkey->ameth->pkey_size) {
183  return pkey->ameth->pkey_size(pkey);
184  }
185  return 0;
186 }
187 
188 int EVP_PKEY_bits(const EVP_PKEY *pkey) {
189  if (pkey && pkey->ameth && pkey->ameth->pkey_bits) {
190  return pkey->ameth->pkey_bits(pkey);
191  }
192  return 0;
193 }
194 
195 int EVP_PKEY_id(const EVP_PKEY *pkey) {
196  return pkey->type;
197 }
198 
199 // evp_pkey_asn1_find returns the ASN.1 method table for the given |nid|, which
200 // should be one of the |EVP_PKEY_*| values. It returns NULL if |nid| is
201 // unknown.
203  switch (nid) {
204  case EVP_PKEY_RSA:
205  return &rsa_asn1_meth;
206  case EVP_PKEY_EC:
207  return &ec_asn1_meth;
208  case EVP_PKEY_DSA:
209  return &dsa_asn1_meth;
210  case EVP_PKEY_ED25519:
211  return &ed25519_asn1_meth;
212  case EVP_PKEY_X25519:
213  return &x25519_asn1_meth;
214  default:
215  return NULL;
216  }
217 }
218 
219 int EVP_PKEY_type(int nid) {
221  if (meth == NULL) {
222  return NID_undef;
223  }
224  return meth->pkey_id;
225 }
226 
228  if (EVP_PKEY_assign_RSA(pkey, key)) {
229  RSA_up_ref(key);
230  return 1;
231  }
232  return 0;
233 }
234 
236  return EVP_PKEY_assign(pkey, EVP_PKEY_RSA, key);
237 }
238 
240  if (pkey->type != EVP_PKEY_RSA) {
242  return NULL;
243  }
244  return pkey->pkey.rsa;
245 }
246 
248  RSA *rsa = EVP_PKEY_get0_RSA(pkey);
249  if (rsa != NULL) {
250  RSA_up_ref(rsa);
251  }
252  return rsa;
253 }
254 
256  if (EVP_PKEY_assign_DSA(pkey, key)) {
257  DSA_up_ref(key);
258  return 1;
259  }
260  return 0;
261 }
262 
264  return EVP_PKEY_assign(pkey, EVP_PKEY_DSA, key);
265 }
266 
268  if (pkey->type != EVP_PKEY_DSA) {
270  return NULL;
271  }
272  return pkey->pkey.dsa;
273 }
274 
276  DSA *dsa = EVP_PKEY_get0_DSA(pkey);
277  if (dsa != NULL) {
278  DSA_up_ref(dsa);
279  }
280  return dsa;
281 }
282 
284  if (EVP_PKEY_assign_EC_KEY(pkey, key)) {
286  return 1;
287  }
288  return 0;
289 }
290 
292  return EVP_PKEY_assign(pkey, EVP_PKEY_EC, key);
293 }
294 
296  if (pkey->type != EVP_PKEY_EC) {
298  return NULL;
299  }
300  return pkey->pkey.ec;
301 }
302 
304  EC_KEY *ec_key = EVP_PKEY_get0_EC_KEY(pkey);
305  if (ec_key != NULL) {
306  EC_KEY_up_ref(ec_key);
307  }
308  return ec_key;
309 }
310 
311 DH *EVP_PKEY_get0_DH(const EVP_PKEY *pkey) { return NULL; }
312 DH *EVP_PKEY_get1_DH(const EVP_PKEY *pkey) { return NULL; }
313 
314 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) {
315  if (!EVP_PKEY_set_type(pkey, type)) {
316  return 0;
317  }
318  pkey->pkey.ptr = key;
319  return key != NULL;
320 }
321 
322 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type) {
323  const EVP_PKEY_ASN1_METHOD *ameth;
324 
325  if (pkey && pkey->pkey.ptr) {
326  free_it(pkey);
327  }
328 
329  ameth = evp_pkey_asn1_find(type);
330  if (ameth == NULL) {
332  ERR_add_error_dataf("algorithm %d", type);
333  return 0;
334  }
335 
336  if (pkey) {
337  pkey->ameth = ameth;
338  pkey->type = pkey->ameth->pkey_id;
339  }
340 
341  return 1;
342 }
343 
345  const uint8_t *in, size_t len) {
347  if (ret == NULL ||
349  goto err;
350  }
351 
352  if (ret->ameth->set_priv_raw == NULL) {
354  goto err;
355  }
356 
357  if (!ret->ameth->set_priv_raw(ret, in, len)) {
358  goto err;
359  }
360 
361  return ret;
362 
363 err:
365  return NULL;
366 }
367 
369  const uint8_t *in, size_t len) {
371  if (ret == NULL ||
373  goto err;
374  }
375 
376  if (ret->ameth->set_pub_raw == NULL) {
378  goto err;
379  }
380 
381  if (!ret->ameth->set_pub_raw(ret, in, len)) {
382  goto err;
383  }
384 
385  return ret;
386 
387 err:
389  return NULL;
390 }
391 
393  size_t *out_len) {
394  if (pkey->ameth->get_priv_raw == NULL) {
396  return 0;
397  }
398 
399  return pkey->ameth->get_priv_raw(pkey, out, out_len);
400 }
401 
403  size_t *out_len) {
404  if (pkey->ameth->get_pub_raw == NULL) {
406  return 0;
407  }
408 
409  return pkey->ameth->get_pub_raw(pkey, out, out_len);
410 }
411 
413  if (a->type != b->type) {
414  return -1;
415  }
416  if (a->ameth && a->ameth->param_cmp) {
417  return a->ameth->param_cmp(a, b);
418  }
419  return -2;
420 }
421 
424  (void *)md);
425 }
426 
429  0, (void *)out_md);
430 }
431 
432 void *EVP_PKEY_get0(const EVP_PKEY *pkey) {
433  // Node references, but never calls this function, so for now we return NULL.
434  // If other projects require complete support, call |EVP_PKEY_get0_RSA|, etc.,
435  // rather than reading |pkey->pkey.ptr| directly. This avoids problems if our
436  // internal representation does not match the type the caller expects from
437  // OpenSSL.
438  return NULL;
439 }
440 
442 
444 
446 
448 
449 void EVP_cleanup(void) {}
450 
451 int EVP_PKEY_base_id(const EVP_PKEY *pkey) {
452  // OpenSSL has two notions of key type because it supports multiple OIDs for
453  // the same algorithm: NID_rsa vs NID_rsaEncryption and five distinct spelling
454  // of DSA. We do not support these, so the base ID is simply the ID.
455  return EVP_PKEY_id(pkey);
456 }
EVP_PKEY_new_raw_public_key
EVP_PKEY * EVP_PKEY_new_raw_public_key(int type, ENGINE *unused, const uint8_t *in, size_t len)
Definition: evp.c:368
EVP_PKEY_get0_DH
DH * EVP_PKEY_get0_DH(const EVP_PKEY *pkey)
Definition: evp.c:311
EVP_PKEY_EC
#define EVP_PKEY_EC
Definition: evp.h:178
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
ctx
Definition: benchmark-async.c:30
evp_pkey_st::ec
EC_KEY * ec
Definition: evp.h:1058
x25519_asn1_meth
#define x25519_asn1_meth
Definition: boringssl_prefix_symbols.h:3438
EVP_PKEY_assign_EC_KEY
int EVP_PKEY_assign_EC_KEY(EVP_PKEY *pkey, EC_KEY *key)
Definition: evp.c:291
env_md_st
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/internal.h:67
evp.h
evp_pkey_st::rsa
RSA * rsa
Definition: evp.h:1055
evp_pkey_st::dsa
DSA * dsa
Definition: evp.h:1056
EVP_R_EXPECTING_AN_RSA_KEY
#define EVP_R_EXPECTING_AN_RSA_KEY
Definition: evp_errors.h:67
OPENSSL_PUT_ERROR
#define OPENSSL_PUT_ERROR(library, reason)
Definition: err.h:423
evp_pkey_asn1_method_st::pkey_id
int pkey_id
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:70
EVP_PKEY_bits
int EVP_PKEY_bits(const EVP_PKEY *pkey)
Definition: evp.c:188
string.h
EVP_PKEY_OP_TYPE_SIG
#define EVP_PKEY_OP_TYPE_SIG
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:129
free_it
static void free_it(EVP_PKEY *pkey)
Definition: evp.c:99
EVP_PKEY_assign_RSA
int EVP_PKEY_assign_RSA(EVP_PKEY *pkey, RSA *key)
Definition: evp.c:235
evp_pkey_st::ptr
void * ptr
Definition: evp.h:1054
error_ref_leak.err
err
Definition: error_ref_leak.py:35
EVP_PKEY_assign
int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
Definition: evp.c:314
ec_asn1_meth
#define ec_asn1_meth
Definition: boringssl_prefix_symbols.h:3091
EVP_PKEY_new_raw_private_key
EVP_PKEY * EVP_PKEY_new_raw_private_key(int type, ENGINE *unused, const uint8_t *in, size_t len)
Definition: evp.c:344
EVP_PKEY_RSA
#define EVP_PKEY_RSA
Definition: evp.h:175
EVP_PKEY_missing_parameters
int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey)
Definition: evp.c:174
a
int a
Definition: abseil-cpp/absl/container/internal/hash_policy_traits_test.cc:88
to
size_t to
Definition: abseil-cpp/absl/container/internal/layout_test.cc:1385
EVP_PKEY_CTX_get_signature_md
int EVP_PKEY_CTX_get_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD **out_md)
Definition: evp.c:427
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
OPENSSL_memset
static void * OPENSSL_memset(void *dst, int c, size_t n)
Definition: third_party/boringssl-with-bazel/src/crypto/internal.h:835
EVP_PKEY_ED25519
#define EVP_PKEY_ED25519
Definition: evp.h:179
evp_pkey_asn1_method_st::pkey_opaque
int(* pkey_opaque)(const EVP_PKEY *pk)
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:106
EVP_PKEY_DSA
#define EVP_PKEY_DSA
Definition: evp.h:177
OPENSSL_malloc
#define OPENSSL_malloc
Definition: boringssl_prefix_symbols.h:1885
EVP_PKEY_get1_DH
DH * EVP_PKEY_get1_DH(const EVP_PKEY *pkey)
Definition: evp.c:312
from
size_t from
Definition: abseil-cpp/absl/container/internal/layout_test.cc:1384
EVP_PKEY_X25519
#define EVP_PKEY_X25519
Definition: evp.h:180
in
const char * in
Definition: third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:391
EVP_PKEY_get0_EC_KEY
EC_KEY * EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey)
Definition: evp.c:295
evp_pkey_ctx_st
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:182
evp_pkey_asn1_method_st::pkey_size
int(* pkey_size)(const EVP_PKEY *pk)
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:108
internal.h
EVP_PKEY_NONE
#define EVP_PKEY_NONE
Definition: evp.h:174
evp_pkey_st
Definition: evp.h:1046
EVP_PKEY_free
void EVP_PKEY_free(EVP_PKEY *pkey)
Definition: evp.c:107
ERR_add_error_dataf
#define ERR_add_error_dataf
Definition: boringssl_prefix_symbols.h:1412
EVP_PKEY_new
EVP_PKEY * EVP_PKEY_new(void)
Definition: evp.c:83
EVP_PKEY_set1_EC_KEY
int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key)
Definition: evp.c:283
EVP_PKEY_CTRL_GET_MD
#define EVP_PKEY_CTRL_GET_MD
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:151
EVP_PKEY_set1_RSA
int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key)
Definition: evp.c:227
EVP_PKEY_is_opaque
int EVP_PKEY_is_opaque(const EVP_PKEY *pkey)
Definition: evp.c:125
rsa_asn1_meth
#define rsa_asn1_meth
Definition: boringssl_prefix_symbols.h:3356
EVP_PKEY_assign_DSA
int EVP_PKEY_assign_DSA(EVP_PKEY *pkey, DSA *key)
Definition: evp.c:263
err.h
rsa.h
evp_pkey_st::ameth
const EVP_PKEY_ASN1_METHOD * ameth
Definition: evp.h:1063
OpenSSL_add_all_ciphers
void OpenSSL_add_all_ciphers(void)
Definition: evp.c:445
dsa.h
EVP_PKEY_set1_DSA
int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key)
Definition: evp.c:255
NID_undef
#define NID_undef
Definition: nid.h:85
EVP_R_EXPECTING_AN_EC_KEY_KEY
#define EVP_R_EXPECTING_AN_EC_KEY_KEY
Definition: evp_errors.h:66
OPENSSL_DECLARE_ERROR_REASON
#define OPENSSL_DECLARE_ERROR_REASON(lib, reason)
Definition: err.h:459
EVP_R_EXPECTING_A_DSA_KEY
#define EVP_R_EXPECTING_A_DSA_KEY
Definition: evp_errors.h:68
EVP_PKEY_CTX_ctrl
#define EVP_PKEY_CTX_ctrl
Definition: boringssl_prefix_symbols.h:1584
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
EVP_PKEY_id
int EVP_PKEY_id(const EVP_PKEY *pkey)
Definition: evp.c:195
evp_pkey_asn1_method_st::pkey_free
void(* pkey_free)(EVP_PKEY *pkey)
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:115
evp_pkey_st::type
int type
Definition: evp.h:1051
nid
int nid
Definition: cipher_extra.c:71
ec_key_st
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:723
EVP_PKEY_CTX_set_signature_md
int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md)
Definition: evp.c:422
EVP_R_MISSING_PARAMETERS
#define EVP_R_MISSING_PARAMETERS
Definition: evp_errors.h:78
EVP_PKEY_copy_parameters
int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)
Definition: evp.c:155
evp_pkey_st::pkey
union evp_pkey_st::@364 pkey
EVP_PKEY_CTRL_MD
#define EVP_PKEY_CTRL_MD
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:150
EVP_PKEY_get_raw_public_key
int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, uint8_t *out, size_t *out_len)
Definition: evp.c:402
benchmark.md
md
Definition: benchmark.py:86
EVP_R_UNSUPPORTED_ALGORITHM
#define EVP_R_UNSUPPORTED_ALGORITHM
Definition: evp_errors.h:88
nid.h
key
const char * key
Definition: hpack_parser_table.cc:164
evp_pkey_asn1_method_st::get_priv_raw
int(* get_priv_raw)(const EVP_PKEY *pkey, uint8_t *out, size_t *out_len)
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:101
EVP_PKEY_get_raw_private_key
int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, uint8_t *out, size_t *out_len)
Definition: evp.c:392
evp_pkey_asn1_method_st::get_pub_raw
int(* get_pub_raw)(const EVP_PKEY *pkey, uint8_t *out, size_t *out_len)
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:102
EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE
#define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE
Definition: evp_errors.h:85
EVP_PKEY_get1_DSA
DSA * EVP_PKEY_get1_DSA(const EVP_PKEY *pkey)
Definition: evp.c:275
EVP_PKEY_base_id
int EVP_PKEY_base_id(const EVP_PKEY *pkey)
Definition: evp.c:451
EC_KEY_up_ref
#define EC_KEY_up_ref
Definition: boringssl_prefix_symbols.h:1369
EVP_PKEY_cmp_parameters
int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b)
Definition: evp.c:412
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
EVP_PKEY_get1_RSA
RSA * EVP_PKEY_get1_RSA(const EVP_PKEY *pkey)
Definition: evp.c:247
dsa_st
Definition: dsa.h:398
OpenSSL_add_all_digests
void OpenSSL_add_all_digests(void)
Definition: evp.c:447
evp_pkey_asn1_method_st::pkey_bits
int(* pkey_bits)(const EVP_PKEY *pk)
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:109
EVP_PKEY_get0_DSA
DSA * EVP_PKEY_get0_DSA(const EVP_PKEY *pkey)
Definition: evp.c:267
EVP_PKEY_size
int EVP_PKEY_size(const EVP_PKEY *pkey)
Definition: evp.c:181
engine_st
Definition: engine.c:29
CRYPTO_refcount_inc
#define CRYPTO_refcount_inc
Definition: boringssl_prefix_symbols.h:1191
EVP_PKEY_type
int EVP_PKEY_type(int nid)
Definition: evp.c:219
OpenSSL_add_all_algorithms
void OpenSSL_add_all_algorithms(void)
Definition: evp.c:441
dsa_asn1_meth
#define dsa_asn1_meth
Definition: boringssl_prefix_symbols.h:3056
EVP_PKEY_cmp
int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
Definition: evp.c:132
evp_pkey_asn1_method_st
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:69
EVP_R_DIFFERENT_KEY_TYPES
#define EVP_R_DIFFERENT_KEY_TYPES
Definition: evp_errors.h:63
dh_st
Definition: dh.h:305
mem.h
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
rsa_st
Definition: rsa.h:732
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
EVP_PKEY_get1_EC_KEY
EC_KEY * EVP_PKEY_get1_EC_KEY(const EVP_PKEY *pkey)
Definition: evp.c:303
evp_pkey_asn1_method_st::param_missing
int(* param_missing)(const EVP_PKEY *pk)
Definition: third_party/boringssl-with-bazel/src/crypto/evp/internal.h:111
EVP_PKEY_set_type
int EVP_PKEY_set_type(EVP_PKEY *pkey, int type)
Definition: evp.c:322
EVP_PKEY_up_ref
int EVP_PKEY_up_ref(EVP_PKEY *pkey)
Definition: evp.c:120
thread.h
ec.h
OPENSSL_free
#define OPENSSL_free
Definition: boringssl_prefix_symbols.h:1869
evp_pkey_asn1_find
static const EVP_PKEY_ASN1_METHOD * evp_pkey_asn1_find(int nid)
Definition: evp.c:202
RSA_up_ref
#define RSA_up_ref
Definition: boringssl_prefix_symbols.h:2140
evp_pkey_st::references
CRYPTO_refcount_t references
Definition: evp.h:1047
OPENSSL_add_all_algorithms_conf
void OPENSSL_add_all_algorithms_conf(void)
Definition: evp.c:443
EVP_PKEY_get0_RSA
RSA * EVP_PKEY_get0_RSA(const EVP_PKEY *pkey)
Definition: evp.c:239
ERR_R_MALLOC_FAILURE
#define ERR_R_MALLOC_FAILURE
Definition: err.h:371
ed25519_asn1_meth
#define ed25519_asn1_meth
Definition: boringssl_prefix_symbols.h:3155
DSA_up_ref
#define DSA_up_ref
Definition: boringssl_prefix_symbols.h:1293
EVP_PKEY_get0
void * EVP_PKEY_get0(const EVP_PKEY *pkey)
Definition: evp.c:432
CRYPTO_refcount_dec_and_test_zero
#define CRYPTO_refcount_dec_and_test_zero
Definition: boringssl_prefix_symbols.h:1190
EVP_cleanup
void EVP_cleanup(void)
Definition: evp.c:449


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:19