#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 "../asn1/internal.h"
#include "internal.h"
int X509_verify(X509 *x509, EVP_PKEY *pkey) { … }
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_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_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 NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md) { … }
int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *spki, EVP_PKEY *pkey) { … }
X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl) { … }
int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl) { … }
X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl) { … }
int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl) { … }
X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req) { … }
int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req) { … }
X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req) { … }
int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req) { … }
#define IMPLEMENT_D2I_FP(type, name, bio_func) …
#define IMPLEMENT_I2D_FP(type, name, bio_func) …
IMPLEMENT_D2I_FP(X509, d2i_X509_fp, d2i_X509_bio);
IMPLEMENT_I2D_FP(X509, i2d_X509_fp, i2d_X509_bio);
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(RSA, i2d_RSAPrivateKey_fp, i2d_RSAPrivateKey_bio)
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(RSA, i2d_RSAPublicKey_fp, i2d_RSAPublicKey_bio)
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(RSA, i2d_RSA_PUBKEY_fp, i2d_RSA_PUBKEY_bio)
#define IMPLEMENT_D2I_BIO(type, name, d2i_func) …
#define IMPLEMENT_I2D_BIO(type, name, i2d_func) …
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(X509, i2d_X509_bio, i2d_X509)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(RSA, i2d_RSAPrivateKey_bio, i2d_RSAPrivateKey)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(RSA, i2d_RSAPublicKey_bio, i2d_RSAPublicKey)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(RSA, i2d_RSA_PUBKEY_bio, i2d_RSA_PUBKEY)
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(DSA, i2d_DSAPrivateKey_fp, i2d_DSAPrivateKey_bio)
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(DSA, i2d_DSA_PUBKEY_fp, i2d_DSA_PUBKEY_bio)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(DSA, i2d_DSAPrivateKey_bio, i2d_DSAPrivateKey)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(DSA, i2d_DSA_PUBKEY_bio, i2d_DSA_PUBKEY)
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(EC_KEY, i2d_ECPrivateKey_fp, i2d_ECPrivateKey_bio)
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(EC_KEY, i2d_EC_PUBKEY_fp, i2d_EC_PUBKEY_bio)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(EC_KEY, i2d_ECPrivateKey_bio, i2d_ECPrivateKey)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(EC_KEY, i2d_EC_PUBKEY_bio, i2d_EC_PUBKEY)
int X509_pubkey_digest(const X509 *data, const EVP_MD *type, unsigned char *md,
unsigned int *len) { … }
int X509_digest(const X509 *x509, const EVP_MD *md, uint8_t *out,
unsigned *out_len) { … }
int X509_CRL_digest(const X509_CRL *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_NAME_digest(const X509_NAME *data, const EVP_MD *type,
unsigned char *md, unsigned int *len) { … }
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(X509_SIG, i2d_PKCS8_fp, i2d_PKCS8_bio)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(X509_SIG, i2d_PKCS8_bio, i2d_X509_SIG)
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(PKCS8_PRIV_KEY_INFO, i2d_PKCS8_PRIV_KEY_INFO_fp,
i2d_PKCS8_PRIV_KEY_INFO_bio)
int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key) { … }
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(EVP_PKEY, i2d_PrivateKey_fp, i2d_PrivateKey_bio)
IMPLEMENT_D2I_FP(…)
IMPLEMENT_I2D_FP(EVP_PKEY, i2d_PUBKEY_fp, i2d_PUBKEY_bio)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(PKCS8_PRIV_KEY_INFO, i2d_PKCS8_PRIV_KEY_INFO_bio,
i2d_PKCS8_PRIV_KEY_INFO)
int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key) { … }
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(EVP_PKEY, i2d_PrivateKey_bio, i2d_PrivateKey)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(EVP_PKEY, i2d_PUBKEY_bio, i2d_PUBKEY)
IMPLEMENT_D2I_BIO(…)
IMPLEMENT_I2D_BIO(const DH, i2d_DHparams_bio, i2d_DHparams)