Go to the documentation of this file.
63 #include "../internal.h"
64 #include "../fipsmodule/rsa/internal.h"
86 (
unsigned long)
num->d[0], neg,
87 (
unsigned long)
num->d[0]) <= 0) {
105 for (
i = 0;
i <
n;
i++) {
129 if (*pbuflen <
len) {
137 int include_private) {
140 int ret = 0, mod_len = 0;
146 if (include_private) {
161 if (rsa->
n != NULL) {
169 if (include_private && rsa->
d) {
170 if (
BIO_printf(
out,
"Private-Key: (%d bit)\n", mod_len) <= 0) {
174 s =
"publicExponent:";
176 if (
BIO_printf(
out,
"Public-Key: (%d bit)\n", mod_len) <= 0) {
187 if (include_private) {
221 const char *ktype = NULL;
223 const BIGNUM *priv_key, *pub_key;
227 priv_key =
x->priv_key;
232 pub_key =
x->pub_key;
235 ktype =
"DSA-Parameters";
237 ktype =
"Private-Key";
238 }
else if (ptype == 1) {
239 ktype =
"Public-Key";
261 if (!
bn_print(bp,
"priv:", priv_key,
m, off) ||
262 !
bn_print(bp,
"pub: ", pub_key,
m, off) ||
296 size_t buf_len = 0,
i;
304 size_t pub_key_bytes_len = 0;
322 if (pub_key_bytes_len == 0) {
327 if (pub_key_bytes == NULL) {
333 pub_key_bytes, pub_key_bytes_len,
ctx);
334 if (pub_key_bytes_len == 0) {
338 buf_len = pub_key_bytes_len;
344 if (priv_key && (
i = (
size_t)
BN_num_bytes(priv_key)) > buf_len) {
359 ecstr =
"Private-Key";
360 }
else if (ktype == 1) {
361 ecstr =
"Public-Key";
363 ecstr =
"ECDSA-Parameters";
375 if ((priv_key != NULL) &&
379 if (pub_key_bytes != NULL) {
380 BIO_hexdump(bp, pub_key_bytes, pub_key_bytes_len, off);
#define EC_KEY_get0_private_key
#define EC_KEY_get_conv_form
#define EC_POINT_point2oct
X509 X509_REQ PKCS7 PKCS8_PRIV_KEY_INFO RSA DSA DSA EC_KEY EVP_PKEY EVP_PKEY int char * kstr
#define OPENSSL_PUT_ERROR(library, reason)
#define OPENSSL_ARRAY_SIZE(array)
static EVP_PKEY_PRINT_METHOD * find_method(int type)
static int print_unsupported(BIO *out, const EVP_PKEY *pkey, int indent, const char *kstr)
static int do_rsa_print(BIO *out, const RSA *rsa, int off, int include_private)
#define EC_KEY_get0_group
int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)
struct asn1_pctx_st ASN1_PCTX
#define ERR_R_PASSED_NULL_PARAMETER
static int dsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
#define EC_GROUP_get_order
#define EC_KEY_get0_public_key
static int eckey_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)
static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
static int rsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
static void update_buflen(const BIGNUM *b, size_t *pbuflen)
union evp_pkey_st::@364 pkey
static int rsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
UniquePtr< SSL_SESSION > ret
static int bn_print(BIO *bp, const char *number, const BIGNUM *num, uint8_t *buf, int off)
int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)
static int eckey_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
static EVP_PKEY_PRINT_METHOD kPrintMethods[]
static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, int ktype)
static int eckey_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
static int dsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
static int dsa_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
static size_t kPrintMethodsLen
#define ERR_R_MALLOC_FAILURE
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:54