OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Functions
apps.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
#include <assert.h>
#include <openssl/err.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/pem.h>
#include <openssl/pkcs12.h>
#include <openssl/ui.h>
#include <openssl/safestack.h>
#include <openssl/engine.h>
#include <openssl/rsa.h>
#include <openssl/bn.h>
#include <openssl/jpake.h>
#include "apps.h"
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/stat.h>

Go to the source code of this file.

Classes

struct  NAME_EX_TBL
 

Macros

#define NON_MAIN
 
#define X509V3_EXT_UNKNOWN_MASK   (0xfL << 16)
 
#define X509V3_EXT_DEFAULT   0
 
#define X509V3_EXT_ERROR_UNKNOWN   (1L << 16)
 
#define X509V3_EXT_PARSE_UNKNOWN   (2L << 16)
 
#define X509V3_EXT_DUMP_UNKNOWN   (3L << 16)
 
#define X509_FLAG_CA
 
#define BSIZE   256
 
#define S_ISDIR(a)   (((a) & S_IFMT) == S_IFDIR)
 

Functions

int app_init (long mesgwin)
 
int str2fmt (char *s)
 
void program_name (char *in, char *out, int size)
 
int chopup_args (ARGS *arg, char *buf, int *argc, char **argv[])
 
int dump_cert_text (BIO *out, X509 *x)
 
int setup_ui_method (void)
 
void destroy_ui_method (void)
 
int password_callback (char *buf, int bufsiz, int verify, PW_CB_DATA *cb_tmp)
 
int app_passwd (BIO *err, char *arg1, char *arg2, char **pass1, char **pass2)
 
int add_oid_section (BIO *err, CONF *conf)
 
X509load_cert (BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip)
 
EVP_PKEYload_key (BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip)
 
EVP_PKEYload_pubkey (BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip)
 
 STACK_OF (X509)
 
 STACK_OF (X509_CRL)
 
int set_cert_ex (unsigned long *flags, const char *arg)
 
int set_name_ex (unsigned long *flags, const char *arg)
 
int set_ext_copy (int *copy_type, const char *arg)
 
int copy_extensions (X509 *x, X509_REQ *req, int copy_type)
 
void print_name (BIO *out, const char *title, X509_NAME *nm, unsigned long lflags)
 
X509_STOREsetup_verify (BIO *bp, char *CAfile, char *CApath)
 
ENGINEsetup_engine (BIO *err, const char *engine, int debug)
 
int load_config (BIO *err, CONF *cnf)
 
char * make_config_name ()
 
int index_name_cmp (const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b)
 
int save_serial (char *serialfile, char *suffix, BIGNUM *serial, ASN1_INTEGER **retai)
 
int rotate_serial (char *serialfile, char *new_suffix, char *old_suffix)
 
int rand_serial (BIGNUM *b, ASN1_INTEGER *ai)
 
CA_DBload_index (char *dbfile, DB_ATTR *db_attr)
 
int index_index (CA_DB *db)
 
int save_index (const char *dbfile, const char *suffix, CA_DB *db)
 
int rotate_index (const char *dbfile, const char *new_suffix, const char *old_suffix)
 
void free_index (CA_DB *db)
 
int parse_yesno (const char *str, int def)
 
X509_NAMEparse_name (char *subject, long chtype, int multirdn)
 
int args_verify (char ***pargs, int *pargc, int *badarg, BIO *err, X509_VERIFY_PARAM **pm)
 
int bio_to_mem (unsigned char **out, int maxlen, BIO *in)
 
int pkey_ctrl_string (EVP_PKEY_CTX *ctx, char *value)
 
void policies_print (BIO *out, X509_STORE_CTX *ctx)
 
void jpake_client_auth (BIO *out, BIO *conn, const char *secret)
 
void jpake_server_auth (BIO *out, BIO *conn, const char *secret)
 
unsigned char * next_protos_parse (unsigned short *outlen, const char *in)
 
double app_tminterval (int stop, int usertime)
 
int app_isdir (const char *name)
 
int raw_read_stdin (void *buf, int siz)
 
int raw_write_stdout (const void *buf, int siz)
 

Macro Definition Documentation

#define BSIZE   256
#define NON_MAIN

Definition at line 146 of file apps.c.

#define S_ISDIR (   a)    (((a) & S_IFMT) == S_IFDIR)

Definition at line 3049 of file apps.c.

#define X509_FLAG_CA
Value:

Definition at line 1242 of file apps.c.

#define X509V3_EXT_DEFAULT   0

Definition at line 1234 of file apps.c.

#define X509V3_EXT_DUMP_UNKNOWN   (3L << 16)

Definition at line 1240 of file apps.c.

#define X509V3_EXT_ERROR_UNKNOWN   (1L << 16)

Definition at line 1236 of file apps.c.

#define X509V3_EXT_PARSE_UNKNOWN   (2L << 16)

Definition at line 1238 of file apps.c.

#define X509V3_EXT_UNKNOWN_MASK   (0xfL << 16)

Definition at line 1232 of file apps.c.

Function Documentation

int add_oid_section ( BIO err,
CONF conf 
)

Definition at line 715 of file apps.c.

int app_init ( long  mesgwin)

Definition at line 452 of file apps.c.

int app_isdir ( const char *  name)

Definition at line 3053 of file apps.c.

int app_passwd ( BIO err,
char *  arg1,
char *  arg2,
char **  pass1,
char **  pass2 
)

Definition at line 632 of file apps.c.

double app_tminterval ( int  stop,
int  usertime 
)

Definition at line 2999 of file apps.c.

int args_verify ( char ***  pargs,
int *  pargc,
int *  badarg,
BIO err,
X509_VERIFY_PARAM **  pm 
)

Definition at line 2252 of file apps.c.

int bio_to_mem ( unsigned char **  out,
int  maxlen,
BIO in 
)

Definition at line 2407 of file apps.c.

int chopup_args ( ARGS arg,
char *  buf,
int *  argc,
char **  argv[] 
)

Definition at line 380 of file apps.c.

int copy_extensions ( X509 x,
X509_REQ req,
int  copy_type 
)

Definition at line 1319 of file apps.c.

void destroy_ui_method ( void  )

Definition at line 539 of file apps.c.

int dump_cert_text ( BIO out,
X509 x 
)

Definition at line 459 of file apps.c.

void free_index ( CA_DB db)

Definition at line 2078 of file apps.c.

int index_index ( CA_DB db)

Definition at line 1875 of file apps.c.

int index_name_cmp ( const OPENSSL_CSTRING a,
const OPENSSL_CSTRING b 
)

Definition at line 1578 of file apps.c.

void jpake_client_auth ( BIO out,
BIO conn,
const char *  secret 
)

Definition at line 2663 of file apps.c.

void jpake_server_auth ( BIO out,
BIO conn,
const char *  secret 
)

Definition at line 2692 of file apps.c.

X509* load_cert ( BIO err,
const char *  file,
int  format,
const char *  pass,
ENGINE e,
const char *  cert_descrip 
)

Definition at line 786 of file apps.c.

int load_config ( BIO err,
CONF cnf 
)

Definition at line 1515 of file apps.c.

CA_DB* load_index ( char *  dbfile,
DB_ATTR db_attr 
)

Definition at line 1796 of file apps.c.

EVP_PKEY* load_key ( BIO err,
const char *  file,
int  format,
int  maybe_stdin,
const char *  pass,
ENGINE e,
const char *  key_descrip 
)

Definition at line 862 of file apps.c.

EVP_PKEY* load_pubkey ( BIO err,
const char *  file,
int  format,
int  maybe_stdin,
const char *  pass,
ENGINE e,
const char *  key_descrip 
)

Definition at line 960 of file apps.c.

char* make_config_name ( void  )

Definition at line 1537 of file apps.c.

unsigned char* next_protos_parse ( unsigned short *  outlen,
const char *  in 
)

Definition at line 2732 of file apps.c.

X509_NAME* parse_name ( char *  subject,
long  chtype,
int  multirdn 
)

Definition at line 2120 of file apps.c.

int parse_yesno ( const char *  str,
int  def 
)

Definition at line 2087 of file apps.c.

int password_callback ( char *  buf,
int  bufsiz,
int  verify,
PW_CB_DATA cb_tmp 
)

Definition at line 547 of file apps.c.

int pkey_ctrl_string ( EVP_PKEY_CTX ctx,
char *  value 
)

Definition at line 2440 of file apps.c.

void policies_print ( BIO out,
X509_STORE_CTX ctx 
)

Definition at line 2477 of file apps.c.

void print_name ( BIO out,
const char *  title,
X509_NAME nm,
unsigned long  lflags 
)

Definition at line 1403 of file apps.c.

void program_name ( char *  in,
char *  out,
int  size 
)

Definition at line 366 of file apps.c.

int rand_serial ( BIGNUM b,
ASN1_INTEGER ai 
)

Definition at line 1769 of file apps.c.

int raw_read_stdin ( void buf,
int  siz 
)

Definition at line 3076 of file apps.c.

int raw_write_stdout ( const void buf,
int  siz 
)

Definition at line 3089 of file apps.c.

int rotate_index ( const char *  dbfile,
const char *  new_suffix,
const char *  old_suffix 
)

Definition at line 1966 of file apps.c.

int rotate_serial ( char *  serialfile,
char *  new_suffix,
char *  old_suffix 
)

Definition at line 1708 of file apps.c.

int save_index ( const char *  dbfile,
const char *  suffix,
CA_DB db 
)

Definition at line 1899 of file apps.c.

int save_serial ( char *  serialfile,
char *  suffix,
BIGNUM serial,
ASN1_INTEGER **  retai 
)

Definition at line 1646 of file apps.c.

int set_cert_ex ( unsigned long *  flags,
const char *  arg 
)

Definition at line 1245 of file apps.c.

int set_ext_copy ( int *  copy_type,
const char *  arg 
)

Definition at line 1306 of file apps.c.

int set_name_ex ( unsigned long *  flags,
const char *  arg 
)

Definition at line 1271 of file apps.c.

ENGINE* setup_engine ( BIO err,
const char *  engine,
int  debug 
)

Definition at line 1473 of file apps.c.

int setup_ui_method ( void  )

Definition at line 530 of file apps.c.

X509_STORE* setup_verify ( BIO bp,
char *  CAfile,
char *  CApath 
)

Definition at line 1426 of file apps.c.

STACK_OF ( X509  )

Definition at line 1214 of file apps.c.

STACK_OF ( X509_CRL  )

Definition at line 1223 of file apps.c.

int str2fmt ( char *  s)

Definition at line 258 of file apps.c.