Macros | Functions
x_all.c File Reference
#include <openssl/x509.h>
#include <limits.h>
#include <openssl/asn1.h>
#include <openssl/digest.h>
#include <openssl/dsa.h>
#include <openssl/evp.h>
#include <openssl/mem.h>
#include <openssl/rsa.h>
#include <openssl/stack.h>
#include "internal.h"
Include dependency graph for x_all.c:

Go to the source code of this file.

Macros

#define IMPLEMENT_D2I_BIO(type, name, d2i_func)
 
#define IMPLEMENT_D2I_FP(type, name, bio_func)
 
#define IMPLEMENT_I2D_BIO(type, name, i2d_func)
 
#define IMPLEMENT_I2D_FP(type, name, bio_func)
 

Functions

X509d2i_X509_bio (BIO *bp, X509 **x509)
 
X509_CRLd2i_X509_CRL_bio (BIO *bp, X509_CRL **crl)
 
X509_CRLd2i_X509_CRL_fp (FILE *fp, X509_CRL **crl)
 
X509d2i_X509_fp (FILE *fp, X509 **x509)
 
X509_REQd2i_X509_REQ_bio (BIO *bp, X509_REQ **req)
 
X509_REQd2i_X509_REQ_fp (FILE *fp, X509_REQ **req)
 
int i2d_X509_bio (BIO *bp, X509 *x509)
 
int i2d_X509_CRL_bio (BIO *bp, X509_CRL *crl)
 
int i2d_X509_CRL_fp (FILE *fp, X509_CRL *crl)
 
int i2d_X509_fp (FILE *fp, X509 *x509)
 
int i2d_X509_REQ_bio (BIO *bp, X509_REQ *req)
 
int i2d_X509_REQ_fp (FILE *fp, X509_REQ *req)
 
 IMPLEMENT_D2I_BIO (IMPLEMENT_I2D_BIO(PKCS8_PRIV_KEY_INFO, d2i_PKCS8_PRIV_KEY_INFO_bio, d2i_PKCS8_PRIV_KEY_INFO)
 
 IMPLEMENT_D2I_FP (IMPLEMENT_I2D_FP(PKCS8_PRIV_KEY_INFO, d2i_PKCS8_PRIV_KEY_INFO_fp, d2i_PKCS8_PRIV_KEY_INFO_bio)
 
int NETSCAPE_SPKI_sign (NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md)
 
int NETSCAPE_SPKI_verify (NETSCAPE_SPKI *spki, EVP_PKEY *pkey)
 
int X509_CRL_digest (const X509_CRL *data, const EVP_MD *type, unsigned char *md, unsigned int *len)
 
int X509_CRL_sign (X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md)
 
int X509_CRL_sign_ctx (X509_CRL *x, EVP_MD_CTX *ctx)
 
int X509_digest (const X509 *data, const EVP_MD *type, unsigned char *md, unsigned int *len)
 
int X509_NAME_digest (const X509_NAME *data, const EVP_MD *type, unsigned char *md, unsigned int *len)
 
int X509_pubkey_digest (const X509 *data, const EVP_MD *type, unsigned char *md, unsigned int *len)
 
int X509_REQ_digest (const X509_REQ *data, const EVP_MD *type, unsigned char *md, unsigned int *len)
 
int X509_REQ_sign (X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md)
 
int X509_REQ_sign_ctx (X509_REQ *x, EVP_MD_CTX *ctx)
 
int X509_REQ_verify (X509_REQ *req, EVP_PKEY *pkey)
 
int X509_sign (X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
 
int X509_sign_ctx (X509 *x, EVP_MD_CTX *ctx)
 
int X509_verify (X509 *x509, EVP_PKEY *pkey)
 

Macro Definition Documentation

◆ IMPLEMENT_D2I_BIO

#define IMPLEMENT_D2I_BIO (   type,
  name,
  d2i_func 
)
Value:
type *name(BIO *bio, type **obj) { \
uint8_t *data; \
size_t len; \
if (!BIO_read_asn1(bio, &data, &len, 100 * 1024)) { \
return NULL; \
} \
const uint8_t *ptr = data; \
type *ret = d2i_func(obj, &ptr, (long)len); \
OPENSSL_free(data); \
return ret; \
}

Definition at line 235 of file x_all.c.

◆ IMPLEMENT_D2I_FP

#define IMPLEMENT_D2I_FP (   type,
  name,
  bio_func 
)
Value:
type *name(FILE *fp, type **obj) { \
BIO *bio = BIO_new_fp(fp, BIO_NOCLOSE); \
if (bio == NULL) { \
return NULL; \
} \
type *ret = bio_func(bio, obj); \
BIO_free(bio); \
return ret; \
}

Definition at line 204 of file x_all.c.

◆ IMPLEMENT_I2D_BIO

#define IMPLEMENT_I2D_BIO (   type,
  name,
  i2d_func 
)
Value:
int name(BIO *bio, type *obj) { \
uint8_t *data = NULL; \
int len = i2d_func(obj, &data); \
if (len < 0) { \
return 0; \
} \
int ret = BIO_write_all(bio, data, len); \
OPENSSL_free(data); \
return ret; \
}

Definition at line 248 of file x_all.c.

◆ IMPLEMENT_I2D_FP

#define IMPLEMENT_I2D_FP (   type,
  name,
  bio_func 
)
Value:
int name(FILE *fp, type *obj) { \
BIO *bio = BIO_new_fp(fp, BIO_NOCLOSE); \
if (bio == NULL) { \
return 0; \
} \
int ret = bio_func(bio, obj); \
BIO_free(bio); \
return ret; \
}

Definition at line 215 of file x_all.c.

Function Documentation

◆ d2i_X509_bio()

X509* d2i_X509_bio ( BIO bp,
X509 **  x509 
)

Definition at line 153 of file x_all.c.

◆ d2i_X509_CRL_bio()

X509_CRL* d2i_X509_CRL_bio ( BIO bp,
X509_CRL **  crl 
)

Definition at line 173 of file x_all.c.

◆ d2i_X509_CRL_fp()

X509_CRL* d2i_X509_CRL_fp ( FILE *  fp,
X509_CRL **  crl 
)

Definition at line 163 of file x_all.c.

◆ d2i_X509_fp()

X509* d2i_X509_fp ( FILE *  fp,
X509 **  x509 
)

Definition at line 143 of file x_all.c.

◆ d2i_X509_REQ_bio()

X509_REQ* d2i_X509_REQ_bio ( BIO bp,
X509_REQ **  req 
)

Definition at line 193 of file x_all.c.

◆ d2i_X509_REQ_fp()

X509_REQ* d2i_X509_REQ_fp ( FILE *  fp,
X509_REQ **  req 
)

Definition at line 183 of file x_all.c.

◆ i2d_X509_bio()

int i2d_X509_bio ( BIO bp,
X509 x509 
)

Definition at line 158 of file x_all.c.

◆ i2d_X509_CRL_bio()

int i2d_X509_CRL_bio ( BIO bp,
X509_CRL crl 
)

Definition at line 178 of file x_all.c.

◆ i2d_X509_CRL_fp()

int i2d_X509_CRL_fp ( FILE *  fp,
X509_CRL crl 
)

Definition at line 168 of file x_all.c.

◆ i2d_X509_fp()

int i2d_X509_fp ( FILE *  fp,
X509 x509 
)

Definition at line 148 of file x_all.c.

◆ i2d_X509_REQ_bio()

int i2d_X509_REQ_bio ( BIO bp,
X509_REQ req 
)

Definition at line 198 of file x_all.c.

◆ i2d_X509_REQ_fp()

int i2d_X509_REQ_fp ( FILE *  fp,
X509_REQ req 
)

Definition at line 188 of file x_all.c.

◆ IMPLEMENT_D2I_BIO()

IMPLEMENT_D2I_BIO ( IMPLEMENT_I2D_BIO PKCS8_PRIV_KEY_INFO,
d2i_PKCS8_PRIV_KEY_INFO_bio  ,
d2i_PKCS8_PRIV_KEY_INFO   
)

Definition at line 362 of file x_all.c.

◆ IMPLEMENT_D2I_FP()

IMPLEMENT_D2I_FP ( IMPLEMENT_I2D_FP PKCS8_PRIV_KEY_INFO,
d2i_PKCS8_PRIV_KEY_INFO_fp  ,
d2i_PKCS8_PRIV_KEY_INFO_bio   
)

Definition at line 339 of file x_all.c.

◆ NETSCAPE_SPKI_sign()

int NETSCAPE_SPKI_sign ( NETSCAPE_SPKI x,
EVP_PKEY pkey,
const EVP_MD md 
)

Definition at line 131 of file x_all.c.

◆ NETSCAPE_SPKI_verify()

int NETSCAPE_SPKI_verify ( NETSCAPE_SPKI spki,
EVP_PKEY pkey 
)

Definition at line 137 of file x_all.c.

◆ X509_CRL_digest()

int X509_CRL_digest ( const X509_CRL data,
const EVP_MD type,
unsigned char *  md,
unsigned int len 
)

Definition at line 312 of file x_all.c.

◆ X509_CRL_sign()

int X509_CRL_sign ( X509_CRL x,
EVP_PKEY pkey,
const EVP_MD md 
)

Definition at line 116 of file x_all.c.

◆ X509_CRL_sign_ctx()

int X509_CRL_sign_ctx ( X509_CRL x,
EVP_MD_CTX ctx 
)

Definition at line 123 of file x_all.c.

◆ X509_digest()

int X509_digest ( const X509 data,
const EVP_MD type,
unsigned char *  md,
unsigned int len 
)

Definition at line 305 of file x_all.c.

◆ X509_NAME_digest()

int X509_NAME_digest ( const X509_NAME data,
const EVP_MD type,
unsigned char *  md,
unsigned int len 
)

Definition at line 326 of file x_all.c.

◆ X509_pubkey_digest()

int X509_pubkey_digest ( const X509 data,
const EVP_MD type,
unsigned char *  md,
unsigned int len 
)

Definition at line 295 of file x_all.c.

◆ X509_REQ_digest()

int X509_REQ_digest ( const X509_REQ data,
const EVP_MD type,
unsigned char *  md,
unsigned int len 
)

Definition at line 319 of file x_all.c.

◆ X509_REQ_sign()

int X509_REQ_sign ( X509_REQ x,
EVP_PKEY pkey,
const EVP_MD md 
)

Definition at line 103 of file x_all.c.

◆ X509_REQ_sign_ctx()

int X509_REQ_sign_ctx ( X509_REQ x,
EVP_MD_CTX ctx 
)

Definition at line 109 of file x_all.c.

◆ X509_REQ_verify()

int X509_REQ_verify ( X509_REQ req,
EVP_PKEY pkey 
)

Definition at line 82 of file x_all.c.

◆ X509_sign()

int X509_sign ( X509 x,
EVP_PKEY pkey,
const EVP_MD md 
)

Definition at line 88 of file x_all.c.

◆ X509_sign_ctx()

int X509_sign_ctx ( X509 x,
EVP_MD_CTX ctx 
)

Definition at line 95 of file x_all.c.

◆ X509_verify()

int X509_verify ( X509 x509,
EVP_PKEY pkey 
)

Definition at line 72 of file x_all.c.

ptr
char * ptr
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:45
BIO_read_asn1
#define BIO_read_asn1
Definition: boringssl_prefix_symbols.h:832
obj
OPENSSL_EXPORT const ASN1_OBJECT * obj
Definition: x509.h:1671
BIO_new_fp
#define BIO_new_fp
Definition: boringssl_prefix_symbols.h:819
bio_st
Definition: bio.h:822
setup.name
name
Definition: setup.py:542
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
benchmark.FILE
FILE
Definition: benchmark.py:21
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
BIO_NOCLOSE
#define BIO_NOCLOSE
Definition: bio.h:373
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
BIO_write_all
#define BIO_write_all
Definition: boringssl_prefix_symbols.h:871
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:38