doc/man3: reformat the function prototypes in the synopses
I tried hard to keep the lines at 80 characters or less, but in a few cases I had to punt and just indented the subsequent lines by 4 spaces. A few well-placed typedefs for callback functions would really help, but these would be part of the API, so that's probably for later. I also took the liberty of inserting empty lines in overlong blocks to provide some visual space. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1956)
This commit is contained in:
parent
61ced34f8d
commit
e9b7724687
123 changed files with 674 additions and 534 deletions
|
@ -85,9 +85,11 @@ Set a time structure to one hour after the current time and print it out:
|
|||
|
||||
#include <time.h>
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
ASN1_TIME *tm;
|
||||
time_t t;
|
||||
BIO *b;
|
||||
|
||||
t = time(NULL);
|
||||
tm = ASN1_TIME_adj(NULL, t, 0, 60 * 60);
|
||||
b = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
|
@ -101,7 +103,6 @@ Determine if one time is later or sooner than the current time:
|
|||
|
||||
if (!ASN1_TIME_diff(&day, &sec, NULL, to))
|
||||
/* Invalid time format */
|
||||
|
||||
if (day > 0 || sec > 0)
|
||||
printf("Later\n");
|
||||
else if (day < 0 || sec < 0)
|
||||
|
|
|
@ -17,7 +17,7 @@ waiting for asynchronous jobs to complete
|
|||
OSSL_ASYNC_FD fd,
|
||||
void *custom_data,
|
||||
void (*cleanup)(ASYNC_WAIT_CTX *, const void *,
|
||||
OSSL_ASYNC_FD, void *));
|
||||
OSSL_ASYNC_FD, void *));
|
||||
int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
||||
OSSL_ASYNC_FD *fd, void **custom_data);
|
||||
int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd,
|
||||
|
|
|
@ -187,6 +187,7 @@ The following example demonstrates how to use most of the core async APIs:
|
|||
void cleanup(ASYNC_WAIT_CTX *ctx, const void *key, OSSL_ASYNC_FD r, void *vw)
|
||||
{
|
||||
OSSL_ASYNC_FD *w = (OSSL_ASYNC_FD *)vw;
|
||||
|
||||
close(r);
|
||||
close(*w);
|
||||
OPENSSL_free(w);
|
||||
|
|
|
@ -12,14 +12,16 @@ BF_cfb64_encrypt, BF_ofb64_encrypt, BF_options - Blowfish encryption
|
|||
void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
|
||||
|
||||
void BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
BF_KEY *key, int enc);
|
||||
BF_KEY *key, int enc);
|
||||
void BF_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, BF_KEY *schedule, unsigned char *ivec, int enc);
|
||||
long length, BF_KEY *schedule,
|
||||
unsigned char *ivec, int enc);
|
||||
void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, BF_KEY *schedule, unsigned char *ivec, int *num,
|
||||
int enc);
|
||||
long length, BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, BF_KEY *schedule, unsigned char *ivec, int *num);
|
||||
long length, BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num);
|
||||
const char *BF_options(void);
|
||||
|
||||
void BF_encrypt(BF_LONG *data, const BF_KEY *key);
|
||||
|
|
|
@ -12,7 +12,8 @@ BIO_get_info_callback, BIO_set_info_callback, bio_info_cb
|
|||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
typedef void (*bio_info_cb)(BIO *b, int oper, const char *ptr, int arg1, long arg2, long arg3);
|
||||
typedef void (*bio_info_cb)(BIO *b, int oper, const char *ptr,
|
||||
int arg1, long arg2, long arg3);
|
||||
|
||||
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
|
||||
long BIO_callback_ctrl(BIO *b, int cmd, bio_info_cb cb);
|
||||
|
|
|
@ -13,7 +13,7 @@ BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - cipher
|
|||
|
||||
const BIO_METHOD *BIO_f_cipher(void);
|
||||
void BIO_set_cipher(BIO *b, const EVP_CIPHER *cipher,
|
||||
unsigned char *key, unsigned char *iv, int enc);
|
||||
unsigned char *key, unsigned char *iv, int enc);
|
||||
int BIO_get_cipher_status(BIO *b)
|
||||
int BIO_get_cipher_ctx(BIO *b, EVP_CIPHER_CTX **pctx)
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ checking has been omitted for clarity.
|
|||
|
||||
BIO *bio, *mdtmp;
|
||||
char message[] = "Hello World";
|
||||
|
||||
bio = BIO_new(BIO_s_null());
|
||||
mdtmp = BIO_new(BIO_f_md());
|
||||
BIO_set_md(mdtmp, EVP_sha1());
|
||||
|
@ -98,6 +99,7 @@ The next example digests data by reading through a chain instead:
|
|||
BIO *bio, *mdtmp;
|
||||
char buf[1024];
|
||||
int rdlen;
|
||||
|
||||
bio = BIO_new_file(file, "rb");
|
||||
mdtmp = BIO_new(BIO_f_md());
|
||||
BIO_set_md(mdtmp, EVP_sha1());
|
||||
|
@ -117,9 +119,11 @@ outputs them. This could be used with the examples above.
|
|||
unsigned char mdbuf[EVP_MAX_MD_SIZE];
|
||||
int mdlen;
|
||||
int i;
|
||||
|
||||
mdtmp = bio; /* Assume bio has previously been set up */
|
||||
do {
|
||||
EVP_MD *md;
|
||||
|
||||
mdtmp = BIO_find_type(mdtmp, BIO_TYPE_MD);
|
||||
if (!mdtmp)
|
||||
break;
|
||||
|
|
|
@ -8,7 +8,7 @@ BIO_f_null - null filter
|
|||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
const BIO_METHOD * BIO_f_null(void);
|
||||
const BIO_METHOD *BIO_f_null(void);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ BIO_method_type() returns the type of the BIO B<b>.
|
|||
Traverse a chain looking for digest BIOs:
|
||||
|
||||
BIO *btmp;
|
||||
btmp = in_bio; /* in_bio is chain to search through */
|
||||
|
||||
btmp = in_bio; /* in_bio is chain to search through */
|
||||
do {
|
||||
btmp = BIO_find_type(btmp, BIO_TYPE_MD);
|
||||
if (btmp == NULL)
|
||||
|
|
|
@ -22,9 +22,9 @@ RSA_get_ex_new_index, RSA_set_ex_data, RSA_get_ex_data
|
|||
#include <openssl/x509.h>
|
||||
|
||||
int TYPE_get_ex_new_index(long argl, void *argp,
|
||||
CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
|
||||
int TYPE_set_ex_data(TYPE *d, int idx, void *arg);
|
||||
|
||||
|
|
|
@ -16,41 +16,45 @@ BIO_meth_set_callback_ctrl - Routines to build up BIO methods
|
|||
#include <openssl/bio.h>
|
||||
|
||||
int BIO_get_new_index(void);
|
||||
|
||||
BIO_METHOD *BIO_meth_new(int type, const char *name);
|
||||
|
||||
void BIO_meth_free(BIO_METHOD *biom);
|
||||
int (*BIO_meth_get_write_ex(BIO_METHOD *biom)) (BIO *, const char *, size_t,
|
||||
size_t *);
|
||||
int (*BIO_meth_get_write(BIO_METHOD *biom)) (BIO *, const char *, int);
|
||||
int BIO_meth_set_write_ex(BIO_METHOD *biom,
|
||||
int (*bwrite) (BIO *, const char *, size_t,
|
||||
size_t *));
|
||||
int BIO_meth_set_write(BIO_METHOD *biom,
|
||||
int (*write) (BIO *, const char *, int));
|
||||
int (*BIO_meth_get_read_ex(BIO_METHOD *biom)) (BIO *, char *, size_t,
|
||||
|
||||
int (*BIO_meth_get_write_ex(BIO_METHOD *biom))(BIO *, const char *, size_t,
|
||||
size_t *);
|
||||
int (*BIO_meth_get_read(BIO_METHOD *biom)) (BIO *, char *, int);
|
||||
int (*BIO_meth_get_write(BIO_METHOD *biom))(BIO *, const char *, int);
|
||||
int BIO_meth_set_write_ex(BIO_METHOD *biom,
|
||||
int (*bwrite)(BIO *, const char *, size_t, size_t *));
|
||||
int BIO_meth_set_write(BIO_METHOD *biom,
|
||||
int (*write)(BIO *, const char *, int));
|
||||
|
||||
int (*BIO_meth_get_read_ex(BIO_METHOD *biom))(BIO *, char *, size_t, size_t *);
|
||||
int (*BIO_meth_get_read(BIO_METHOD *biom))(BIO *, char *, int);
|
||||
int BIO_meth_set_read_ex(BIO_METHOD *biom,
|
||||
int (*bread) (BIO *, char *, size_t, size_t *));
|
||||
int BIO_meth_set_read(BIO_METHOD *biom,
|
||||
int (*read) (BIO *, char *, int));
|
||||
int (*BIO_meth_get_puts(BIO_METHOD *biom)) (BIO *, const char *);
|
||||
int BIO_meth_set_puts(BIO_METHOD *biom,
|
||||
int (*puts) (BIO *, const char *));
|
||||
int (*BIO_meth_get_gets(BIO_METHOD *biom)) (BIO *, char *, int);
|
||||
int (*bread)(BIO *, char *, size_t, size_t *));
|
||||
int BIO_meth_set_read(BIO_METHOD *biom, int (*read)(BIO *, char *, int));
|
||||
|
||||
int (*BIO_meth_get_puts(BIO_METHOD *biom))(BIO *, const char *);
|
||||
int BIO_meth_set_puts(BIO_METHOD *biom, int (*puts)(BIO *, const char *));
|
||||
|
||||
int (*BIO_meth_get_gets(BIO_METHOD *biom))(BIO *, char *, int);
|
||||
int BIO_meth_set_gets(BIO_METHOD *biom,
|
||||
int (*gets) (BIO *, char *, int));
|
||||
long (*BIO_meth_get_ctrl(BIO_METHOD *biom)) (BIO *, int, long, void *);
|
||||
int (*gets)(BIO *, char *, int));
|
||||
|
||||
long (*BIO_meth_get_ctrl(BIO_METHOD *biom))(BIO *, int, long, void *);
|
||||
int BIO_meth_set_ctrl(BIO_METHOD *biom,
|
||||
long (*ctrl) (BIO *, int, long, void *));
|
||||
int (*BIO_meth_get_create(BIO_METHOD *bion)) (BIO *);
|
||||
int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *));
|
||||
int (*BIO_meth_get_destroy(BIO_METHOD *biom)) (BIO *);
|
||||
int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *));
|
||||
long (*BIO_meth_get_callback_ctrl(BIO_METHOD *biom))
|
||||
(BIO *, int, bio_info_cb *);
|
||||
long (*ctrl)(BIO *, int, long, void *));
|
||||
|
||||
int (*BIO_meth_get_create(BIO_METHOD *bion))(BIO *);
|
||||
int BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *));
|
||||
|
||||
int (*BIO_meth_get_destroy(BIO_METHOD *biom))(BIO *);
|
||||
int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy)(BIO *));
|
||||
|
||||
long (*BIO_meth_get_callback_ctrl(BIO_METHOD *biom))(BIO *, int, bio_info_cb *);
|
||||
int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
|
||||
long (*callback_ctrl) (BIO *, int,
|
||||
bio_info_cb *));
|
||||
long (*callback_ctrl)(BIO *, int, bio_info_cb *));
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ BIO_set - BIO allocation and freeing functions
|
|||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO * BIO_new(const BIO_METHOD *type);
|
||||
int BIO_set(BIO *a, const BIO_METHOD *type);
|
||||
int BIO_up_ref(BIO *a);
|
||||
int BIO_free(BIO *a);
|
||||
void BIO_vfree(BIO *a);
|
||||
void BIO_free_all(BIO *a);
|
||||
BIO *BIO_new(const BIO_METHOD *type);
|
||||
int BIO_set(BIO *a, const BIO_METHOD *type);
|
||||
int BIO_up_ref(BIO *a);
|
||||
int BIO_free(BIO *a);
|
||||
void BIO_vfree(BIO *a);
|
||||
void BIO_free_all(BIO *a);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request - BIO pair BIO
|
|||
int BIO_destroy_bio_pair(BIO *b);
|
||||
int BIO_shutdown_wr(BIO *b);
|
||||
|
||||
|
||||
int BIO_set_write_buf_size(BIO *b, long size);
|
||||
size_t BIO_get_write_buf_size(BIO *b, long size);
|
||||
|
||||
|
@ -141,6 +140,7 @@ application. The application can call select() on the socket as required
|
|||
without having to go through the SSL-interface.
|
||||
|
||||
BIO *internal_bio, *network_bio;
|
||||
|
||||
...
|
||||
BIO_new_bio_pair(&internal_bio, 0, &network_bio, 0);
|
||||
SSL_set_bio(ssl, internal_bio, internal_bio);
|
||||
|
|
|
@ -10,7 +10,7 @@ BIO_rw_filename - FILE bio
|
|||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
const BIO_METHOD * BIO_s_file(void);
|
||||
const BIO_METHOD *BIO_s_file(void);
|
||||
BIO *BIO_new_file(const char *filename, const char *mode);
|
||||
BIO *BIO_new_fp(FILE *stream, int flags);
|
||||
|
||||
|
@ -85,12 +85,14 @@ lingual environment, encode file names in UTF-8.
|
|||
File BIO "hello world":
|
||||
|
||||
BIO *bio_out;
|
||||
|
||||
bio_out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
BIO_printf(bio_out, "Hello World\n");
|
||||
|
||||
Alternative technique:
|
||||
|
||||
BIO *bio_out;
|
||||
|
||||
bio_out = BIO_new(BIO_s_file());
|
||||
if (bio_out == NULL)
|
||||
/* Error */
|
||||
|
@ -101,6 +103,7 @@ Alternative technique:
|
|||
Write to a file:
|
||||
|
||||
BIO *out;
|
||||
|
||||
out = BIO_new_file("filename.txt", "w");
|
||||
if (!out)
|
||||
/* Error */
|
||||
|
@ -110,6 +113,7 @@ Write to a file:
|
|||
Alternative technique:
|
||||
|
||||
BIO *out;
|
||||
|
||||
out = BIO_new(BIO_s_file());
|
||||
if (out == NULL)
|
||||
/* Error */
|
||||
|
|
|
@ -10,8 +10,8 @@ BIO_get_mem_ptr, BIO_new_mem_buf - memory BIO
|
|||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
const BIO_METHOD * BIO_s_mem(void);
|
||||
const BIO_METHOD * BIO_s_secmem(void);
|
||||
const BIO_METHOD *BIO_s_mem(void);
|
||||
const BIO_METHOD *BIO_s_secmem(void);
|
||||
|
||||
BIO_set_mem_eof_return(BIO *b, int v)
|
||||
long BIO_get_mem_data(BIO *b, char **pp)
|
||||
|
@ -97,17 +97,18 @@ There should be an option to set the maximum size of a memory BIO.
|
|||
Create a memory BIO and write some data to it:
|
||||
|
||||
BIO *mem = BIO_new(BIO_s_mem());
|
||||
|
||||
BIO_puts(mem, "Hello World\n");
|
||||
|
||||
Create a read only memory BIO:
|
||||
|
||||
char data[] = "Hello World";
|
||||
BIO *mem;
|
||||
mem = BIO_new_mem_buf(data, -1);
|
||||
BIO *mem = BIO_new_mem_buf(data, -1);
|
||||
|
||||
Extract the BUF_MEM structure from a memory BIO and then free up the BIO:
|
||||
|
||||
BUF_MEM *bptr;
|
||||
|
||||
BIO_get_mem_ptr(mem, &bptr);
|
||||
BIO_set_close(mem, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */
|
||||
BIO_free(mem);
|
||||
|
|
|
@ -8,7 +8,7 @@ BIO_s_null - null data sink
|
|||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
const BIO_METHOD * BIO_s_null(void);
|
||||
const BIO_METHOD *BIO_s_null(void);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -13,15 +13,15 @@ BN_BLINDING_set_flags, BN_BLINDING_create_param - blinding related BIGNUM functi
|
|||
#include <openssl/bn.h>
|
||||
|
||||
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai,
|
||||
BIGNUM *mod);
|
||||
BIGNUM *mod);
|
||||
void BN_BLINDING_free(BN_BLINDING *b);
|
||||
int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
int BN_BLINDING_is_current_thread(BN_BLINDING *b);
|
||||
void BN_BLINDING_set_current_thread(BN_BLINDING *b);
|
||||
int BN_BLINDING_lock(BN_BLINDING *b);
|
||||
|
@ -29,10 +29,14 @@ BN_BLINDING_set_flags, BN_BLINDING_create_param - blinding related BIGNUM functi
|
|||
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
|
||||
void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
|
||||
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
|
||||
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
|
||||
int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx),
|
||||
BN_MONT_CTX *m_ctx);
|
||||
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
|
||||
int (*bn_mod_exp)(BIGNUM *r,
|
||||
const BIGNUM *a,
|
||||
const BIGNUM *p,
|
||||
const BIGNUM *m,
|
||||
BN_CTX *ctx,
|
||||
BN_MONT_CTX *m_ctx),
|
||||
BN_MONT_CTX *m_ctx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -19,27 +19,27 @@ arithmetic operations on BIGNUMs
|
|||
int BN_sqr(BIGNUM *r, BIGNUM *a, BN_CTX *ctx);
|
||||
|
||||
int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *a, const BIGNUM *d,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
|
||||
int BN_mod(BIGNUM *rem, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
|
||||
int BN_nnmod(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
|
||||
int BN_mod_add(BIGNUM *r, BIGNUM *a, BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
|
||||
int BN_mod_sub(BIGNUM *r, BIGNUM *a, BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
|
||||
int BN_mod_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
|
||||
int BN_mod_sqr(BIGNUM *r, BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
|
||||
int BN_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BN_CTX *ctx);
|
||||
|
||||
int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
|
||||
int BN_gcd(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
|
||||
|
||||
|
|
|
@ -12,12 +12,12 @@ for primality
|
|||
#include <openssl/bn.h>
|
||||
|
||||
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
|
||||
const BIGNUM *rem, BN_GENCB *cb);
|
||||
const BIGNUM *rem, BN_GENCB *cb);
|
||||
|
||||
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
|
||||
|
||||
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
||||
int do_trial_division, BN_GENCB *cb);
|
||||
int do_trial_division, BN_GENCB *cb);
|
||||
|
||||
int BN_GENCB_call(BN_GENCB *cb, int a, int b);
|
||||
|
||||
|
@ -26,10 +26,10 @@ for primality
|
|||
void BN_GENCB_free(BN_GENCB *cb);
|
||||
|
||||
void BN_GENCB_set_old(BN_GENCB *gencb,
|
||||
void (*callback)(int, int, void *), void *cb_arg);
|
||||
void (*callback)(int, int, void *), void *cb_arg);
|
||||
|
||||
void BN_GENCB_set(BN_GENCB *gencb,
|
||||
int (*callback)(int, int, BN_GENCB *), void *cb_arg);
|
||||
int (*callback)(int, int, BN_GENCB *), void *cb_arg);
|
||||
|
||||
void *BN_GENCB_get_arg(BN_GENCB *cb);
|
||||
|
||||
|
@ -37,14 +37,15 @@ Deprecated:
|
|||
|
||||
#if OPENSSL_API_COMPAT < 0x00908000L
|
||||
BIGNUM *BN_generate_prime(BIGNUM *ret, int num, int safe, BIGNUM *add,
|
||||
BIGNUM *rem, void (*callback)(int, int, void *), void *cb_arg);
|
||||
BIGNUM *rem, void (*callback)(int, int, void *),
|
||||
void *cb_arg);
|
||||
|
||||
int BN_is_prime(const BIGNUM *a, int checks, void (*callback)(int, int,
|
||||
void *), BN_CTX *ctx, void *cb_arg);
|
||||
int BN_is_prime(const BIGNUM *a, int checks,
|
||||
void (*callback)(int, int, void *), BN_CTX *ctx, void *cb_arg);
|
||||
|
||||
int BN_is_prime_fasttest(const BIGNUM *a, int checks,
|
||||
void (*callback)(int, int, void *), BN_CTX *ctx, void *cb_arg,
|
||||
int do_trial_division);
|
||||
void (*callback)(int, int, void *), BN_CTX *ctx,
|
||||
void *cb_arg, int do_trial_division);
|
||||
#endif
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -9,7 +9,7 @@ BN_mod_inverse - compute inverse modulo n
|
|||
#include <openssl/bn.h>
|
||||
|
||||
BIGNUM *BN_mod_inverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ BN_from_montgomery, BN_to_montgomery - Montgomery multiplication
|
|||
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
|
||||
|
||||
int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b,
|
||||
BN_MONT_CTX *mont, BN_CTX *ctx);
|
||||
BN_MONT_CTX *mont, BN_CTX *ctx);
|
||||
|
||||
int BN_from_montgomery(BIGNUM *r, BIGNUM *a, BN_MONT_CTX *mont,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
|
||||
int BN_to_montgomery(BIGNUM *r, BIGNUM *a, BN_MONT_CTX *mont,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ reciprocal
|
|||
int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *m, BN_CTX *ctx);
|
||||
|
||||
int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *a, BN_RECP_CTX *recp,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
|
||||
int BN_mod_mul_reciprocal(BIGNUM *r, BIGNUM *a, BIGNUM *b,
|
||||
BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ CMS_add0_cert, CMS_add1_cert, CMS_get1_certs, CMS_add0_crl, CMS_add1_crl, CMS_ge
|
|||
int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
||||
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
CMS_add0_cert() and CMS_add1_cert() add certificate B<cert> to B<cms>.
|
||||
|
|
|
@ -8,9 +8,15 @@ CMS_add1_recipient_cert, CMS_add0_recipient_key - add recipients to a CMS envelo
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms, X509 *recip, unsigned int flags);
|
||||
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
||||
X509 *recip, unsigned int flags);
|
||||
|
||||
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, unsigned char *key, size_t keylen, unsigned char *id, size_t idlen, ASN1_GENERALIZEDTIME *date, ASN1_OBJECT *otherTypeId, ASN1_TYPE *otherType);
|
||||
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
|
||||
unsigned char *key, size_t keylen,
|
||||
unsigned char *id, size_t idlen,
|
||||
ASN1_GENERALIZEDTIME *date,
|
||||
ASN1_OBJECT *otherTypeId,
|
||||
ASN1_TYPE *otherType);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,11 +8,12 @@ CMS_add1_signer, CMS_SignerInfo_sign - add a signer to a CMS_ContentInfo signed
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, X509 *signcert, EVP_PKEY *pkey, const EVP_MD *md, unsigned int flags);
|
||||
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, X509 *signcert,
|
||||
EVP_PKEY *pkey, const EVP_MD *md,
|
||||
unsigned int flags);
|
||||
|
||||
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
CMS_add1_signer() adds a signer with certificate B<signcert> and private
|
||||
|
|
|
@ -8,7 +8,8 @@ CMS_decrypt - decrypt content from a CMS envelopedData structure
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert, BIO *dcont, BIO *out, unsigned int flags);
|
||||
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ CMS_encrypt - create a CMS envelopedData structure
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
||||
const EVP_CIPHER *cipher, unsigned int flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -16,13 +16,22 @@ CMS_RecipientInfo_decrypt, CMS_RecipientInfo_encrypt
|
|||
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
|
||||
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
|
||||
|
||||
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
||||
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
|
||||
|
||||
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, X509_ALGOR **palg, ASN1_OCTET_STRING **pid, ASN1_GENERALIZEDTIME **pdate, ASN1_OBJECT **potherid, ASN1_TYPE **pothertype);
|
||||
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri, const unsigned char *id, size_t idlen);
|
||||
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, unsigned char *key, size_t keylen);
|
||||
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pid,
|
||||
ASN1_GENERALIZEDTIME **pdate,
|
||||
ASN1_OBJECT **potherid,
|
||||
ASN1_TYPE **pothertype);
|
||||
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
|
||||
const unsigned char *id, size_t idlen);
|
||||
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
|
||||
unsigned char *key, size_t keylen);
|
||||
|
||||
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
|
|
|
@ -13,7 +13,8 @@ CMS_SignerInfo_get0_signature, CMS_SignerInfo_cert_cmp
|
|||
|
||||
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
|
||||
|
||||
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
||||
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
||||
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
||||
|
|
|
@ -8,10 +8,16 @@ CMS_ReceiptRequest_create0, CMS_add1_ReceiptRequest, CMS_get1_ReceiptRequest, CM
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen, int allorfirst, STACK_OF(GENERAL_NAMES) *receiptList, STACK_OF(GENERAL_NAMES) *receiptsTo);
|
||||
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
|
||||
int allorfirst,
|
||||
STACK_OF(GENERAL_NAMES) *receiptList,
|
||||
STACK_OF(GENERAL_NAMES) *receiptsTo);
|
||||
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
|
||||
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
|
||||
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid, int *pallorfirst, STACK_OF(GENERAL_NAMES) **plist, STACK_OF(GENERAL_NAMES) **prto);
|
||||
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid,
|
||||
int *pallorfirst,
|
||||
STACK_OF(GENERAL_NAMES) **plist,
|
||||
STACK_OF(GENERAL_NAMES) **prto);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ CMS_sign - create a CMS SignedData structure
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
BIO *data, unsigned int flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,9 @@ CMS_sign_receipt - create a CMS signed receipt
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert,
|
||||
EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
unsigned int flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ CMS_verify, CMS_get0_signers - verify a CMS SignedData structure
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, X509_STORE *store, BIO *indata, BIO *out, unsigned int flags);
|
||||
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, X509_STORE *store,
|
||||
BIO *indata, BIO *out, unsigned int flags);
|
||||
|
||||
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
|
||||
|
||||
|
|
|
@ -8,7 +8,9 @@ CMS_verify_receipt - verify a CMS signed receipt
|
|||
|
||||
#include <openssl/cms.h>
|
||||
|
||||
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, STACK_OF(X509) *certs, X509_STORE *store, unsigned int flags);
|
||||
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
|
||||
STACK_OF(X509) *certs, X509_STORE *store,
|
||||
unsigned int flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ CONF_modules_load_file, CONF_modules_load - OpenSSL configuration functions
|
|||
#include <openssl/conf.h>
|
||||
|
||||
int CONF_modules_load_file(const char *filename, const char *appname,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
int CONF_modules_load(const CONF *cnf, const char *appname,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -94,6 +94,7 @@ Load and parse configuration file manually, custom error handling:
|
|||
FILE *fp;
|
||||
CONF *cnf = NULL;
|
||||
long eline;
|
||||
|
||||
fp = fopen("/somepath/app.cnf", "r");
|
||||
if (fp == NULL) {
|
||||
fprintf(stderr, "Error opening configuration file\n");
|
||||
|
|
|
@ -12,10 +12,10 @@ CRYPTO_get_ex_data, CRYPTO_free_ex_data, CRYPTO_new_ex_data
|
|||
#include <openssl/crypto.h>
|
||||
|
||||
int CRYPTO_get_ex_new_index(int class_index,
|
||||
long argl, void *argp,
|
||||
CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
long argl, void *argp,
|
||||
CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
|
||||
typedef void CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
|
|
|
@ -20,7 +20,8 @@ Encapsulates the data required to evaluate whether SCTs meet a Certificate Trans
|
|||
X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
|
||||
int CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer);
|
||||
const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx);
|
||||
void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx, CTLOG_STORE *log_store);
|
||||
void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx,
|
||||
CTLOG_STORE *log_store);
|
||||
uint64_t CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx);
|
||||
void CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms);
|
||||
|
||||
|
|
|
@ -56,7 +56,8 @@ stack container
|
|||
STACK_OF(TYPE) *sk_TYPE_deep_copy(const STACK_OF(TYPE) *sk,
|
||||
sk_TYPE_copyfunc copyfunc,
|
||||
sk_TYPE_freefunc freefunc);
|
||||
sk_TYPE_compfunc (*sk_TYPE_set_cmp_func(STACK_OF(TYPE) *sk, sk_TYPE_compfunc compare);
|
||||
sk_TYPE_compfunc (*sk_TYPE_set_cmp_func(STACK_OF(TYPE) *sk,
|
||||
sk_TYPE_compfunc compare));
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -20,75 +20,74 @@ DES_fcrypt, DES_crypt - DES encryption
|
|||
|
||||
int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule);
|
||||
int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
|
||||
int DES_set_key_checked(const_DES_cblock *key,
|
||||
DES_key_schedule *schedule);
|
||||
void DES_set_key_unchecked(const_DES_cblock *key,
|
||||
DES_key_schedule *schedule);
|
||||
int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule);
|
||||
void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule);
|
||||
|
||||
void DES_set_odd_parity(DES_cblock *key);
|
||||
int DES_is_weak_key(const_DES_cblock *key);
|
||||
|
||||
void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
|
||||
DES_key_schedule *ks, int enc);
|
||||
DES_key_schedule *ks, int enc);
|
||||
void DES_ecb2_encrypt(const_DES_cblock *input, DES_cblock *output,
|
||||
DES_key_schedule *ks1, DES_key_schedule *ks2, int enc);
|
||||
DES_key_schedule *ks1, DES_key_schedule *ks2, int enc);
|
||||
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
|
||||
DES_key_schedule *ks1, DES_key_schedule *ks2,
|
||||
DES_key_schedule *ks3, int enc);
|
||||
DES_key_schedule *ks1, DES_key_schedule *ks2,
|
||||
DES_key_schedule *ks3, int enc);
|
||||
|
||||
void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int enc);
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int enc);
|
||||
void DES_cfb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
int numbits, long length, DES_key_schedule *schedule,
|
||||
DES_cblock *ivec, int enc);
|
||||
int numbits, long length, DES_key_schedule *schedule,
|
||||
DES_cblock *ivec, int enc);
|
||||
void DES_ofb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
int numbits, long length, DES_key_schedule *schedule,
|
||||
DES_cblock *ivec);
|
||||
int numbits, long length, DES_key_schedule *schedule,
|
||||
DES_cblock *ivec);
|
||||
void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int enc);
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int enc);
|
||||
void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int *num, int enc);
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int *num, int enc);
|
||||
void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int *num);
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int *num);
|
||||
|
||||
void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
const_DES_cblock *inw, const_DES_cblock *outw, int enc);
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
const_DES_cblock *inw, const_DES_cblock *outw, int enc);
|
||||
|
||||
void DES_ede2_cbc_encrypt(const unsigned char *input,
|
||||
unsigned char *output, long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_cblock *ivec, int enc);
|
||||
void DES_ede2_cfb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_cblock *ivec, int *num, int enc);
|
||||
void DES_ede2_ofb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_cblock *ivec, int *num);
|
||||
void DES_ede2_cbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_cblock *ivec, int enc);
|
||||
void DES_ede2_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_cblock *ivec,
|
||||
int *num, int enc);
|
||||
void DES_ede2_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_cblock *ivec, int *num);
|
||||
|
||||
void DES_ede3_cbc_encrypt(const unsigned char *input,
|
||||
unsigned char *output, long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *ivec,
|
||||
int enc);
|
||||
void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_key_schedule *ks3,
|
||||
DES_cblock *ivec, int enc);
|
||||
void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, DES_key_schedule *ks1, DES_key_schedule *ks2,
|
||||
DES_key_schedule *ks3, DES_cblock *ivec, int *num, int enc);
|
||||
long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_key_schedule *ks3,
|
||||
DES_cblock *ivec, int *num, int enc);
|
||||
void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_key_schedule *ks3,
|
||||
DES_cblock *ivec, int *num);
|
||||
long length, DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2, DES_key_schedule *ks3,
|
||||
DES_cblock *ivec, int *num);
|
||||
|
||||
DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output,
|
||||
long length, DES_key_schedule *schedule,
|
||||
const_DES_cblock *ivec);
|
||||
long length, DES_key_schedule *schedule,
|
||||
const_DES_cblock *ivec);
|
||||
DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],
|
||||
long length, int out_count, DES_cblock *seed);
|
||||
long length, int out_count, DES_cblock *seed);
|
||||
void DES_string_to_key(const char *str, DES_cblock *key);
|
||||
void DES_string_to_2keys(const char *str, DES_cblock *key1,
|
||||
DES_cblock *key2);
|
||||
void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2);
|
||||
|
||||
char *DES_fcrypt(const char *buf, const char *salt, char *ret);
|
||||
char *DES_crypt(const char *buf, const char *salt);
|
||||
|
|
|
@ -19,7 +19,7 @@ Deprecated:
|
|||
|
||||
#if OPENSSL_API_COMPAT < 0x00908000L
|
||||
DH *DH_generate_parameters(int prime_len, int generator,
|
||||
void (*callback)(int, int, void *), void *cb_arg);
|
||||
void (*callback)(int, int, void *), void *cb_arg);
|
||||
#endif
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -15,35 +15,46 @@ DH_meth_set_generate_params - Routines to build up DH methods
|
|||
#include <openssl/dh.h>
|
||||
|
||||
DH_METHOD *DH_meth_new(const char *name, int flags);
|
||||
|
||||
void DH_meth_free(DH_METHOD *dhm);
|
||||
|
||||
DH_METHOD *DH_meth_dup(const DH_METHOD *dhm);
|
||||
|
||||
const char *DH_meth_get0_name(const DH_METHOD *dhm);
|
||||
int DH_meth_set1_name(DH_METHOD *dhm, const char *name);
|
||||
|
||||
int DH_meth_get_flags(DH_METHOD *dhm);
|
||||
int DH_meth_set_flags(DH_METHOD *dhm, int flags);
|
||||
|
||||
void *DH_meth_get0_app_data(const DH_METHOD *dhm);
|
||||
int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data);
|
||||
int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *);
|
||||
int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key) (DH *));
|
||||
|
||||
int (*DH_meth_get_generate_key(const DH_METHOD *dhm))(DH *);
|
||||
int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key)(DH *));
|
||||
|
||||
int (*DH_meth_get_compute_key(const DH_METHOD *dhm))
|
||||
(unsigned char *key, const BIGNUM *pub_key, DH *dh);
|
||||
(unsigned char *key, const BIGNUM *pub_key, DH *dh);
|
||||
int DH_meth_set_compute_key(DH_METHOD *dhm,
|
||||
int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh));
|
||||
int (*compute_key)(unsigned char *key, const BIGNUM *pub_key, DH *dh));
|
||||
|
||||
int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm))
|
||||
(const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int DH_meth_set_bn_mod_exp(DH_METHOD *dhm,
|
||||
int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
|
||||
BN_MONT_CTX *m_ctx));
|
||||
int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
|
||||
BN_MONT_CTX *m_ctx));
|
||||
|
||||
int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
|
||||
int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
|
||||
int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *);
|
||||
int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *));
|
||||
|
||||
int (*DH_meth_get_finish(const DH_METHOD *dhm))(DH *);
|
||||
int DH_meth_set_finish(DH_METHOD *dhm, int (*finish)(DH *));
|
||||
|
||||
int (*DH_meth_get_generate_params(const DH_METHOD *dhm))
|
||||
(DH *, int, int, BN_GENCB *);
|
||||
(DH *, int, int, BN_GENCB *);
|
||||
int DH_meth_set_generate_params(DH_METHOD *dhm,
|
||||
int (*generate_params) (DH *, int, int, BN_GENCB *));
|
||||
int (*generate_params)(DH *, int, int, BN_GENCB *));
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ DSA_do_sign, DSA_do_verify - raw DSA signature operations
|
|||
DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
||||
|
||||
int DSA_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
DSA_SIG *sig, DSA *dsa);
|
||||
DSA_SIG *sig, DSA *dsa);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ DSA_dup_DH - create a DH structure out of DSA structure
|
|||
|
||||
#include <openssl/dsa.h>
|
||||
|
||||
DH * DSA_dup_DH(const DSA *r);
|
||||
DH *DSA_dup_DH(const DSA *r);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -9,15 +9,16 @@ DSA_generate_parameters_ex, DSA_generate_parameters - generate DSA parameters
|
|||
#include <openssl/dsa.h>
|
||||
|
||||
int DSA_generate_parameters_ex(DSA *dsa, int bits,
|
||||
const unsigned char *seed, int seed_len,
|
||||
int *counter_ret, unsigned long *h_ret, BN_GENCB *cb);
|
||||
const unsigned char *seed, int seed_len,
|
||||
int *counter_ret, unsigned long *h_ret,
|
||||
BN_GENCB *cb);
|
||||
|
||||
Deprecated:
|
||||
|
||||
#if OPENSSL_API_COMPAT < 0x00908000L
|
||||
DSA *DSA_generate_parameters(int bits, unsigned char *seed,
|
||||
int seed_len, int *counter_ret, unsigned long *h_ret,
|
||||
void (*callback)(int, int, void *), void *cb_arg);
|
||||
DSA *DSA_generate_parameters(int bits, unsigned char *seed, int seed_len,
|
||||
int *counter_ret, unsigned long *h_ret,
|
||||
void (*callback)(int, int, void *), void *cb_arg);
|
||||
#endif
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -17,50 +17,72 @@ DSA_meth_set_keygen - Routines to build up DSA methods
|
|||
#include <openssl/dsa.h>
|
||||
|
||||
DSA_METHOD *DSA_meth_new(const char *name, int flags);
|
||||
|
||||
void DSA_meth_free(DSA_METHOD *dsam);
|
||||
|
||||
DSA_METHOD *DSA_meth_dup(const DSA_METHOD *meth);
|
||||
|
||||
const char *DSA_meth_get0_name(const DSA_METHOD *dsam);
|
||||
int DSA_meth_set1_name(DSA_METHOD *dsam, const char *name);
|
||||
|
||||
int DSA_meth_get_flags(DSA_METHOD *dsam);
|
||||
int DSA_meth_set_flags(DSA_METHOD *dsam, int flags);
|
||||
|
||||
void *DSA_meth_get0_app_data(const DSA_METHOD *dsam);
|
||||
int DSA_meth_set0_app_data(DSA_METHOD *dsam, void *app_data);
|
||||
DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam))
|
||||
(const unsigned char *, int, DSA *);
|
||||
int DSA_meth_set_sign(DSA_METHOD *dsam,
|
||||
DSA_SIG *(*sign) (const unsigned char *, int, DSA *));
|
||||
int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))
|
||||
(DSA *, BN_CTX *, BIGNUM **, BIGNUM **);
|
||||
int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
|
||||
int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **));
|
||||
int (*DSA_meth_get_verify(const DSA_METHOD *dsam))
|
||||
(const unsigned char *, int , DSA_SIG *, DSA *);
|
||||
int DSA_meth_set_verify(DSA_METHOD *dsam,
|
||||
int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *));
|
||||
int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))
|
||||
(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2,
|
||||
BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
|
||||
int DSA_meth_set_mod_exp(DSA_METHOD *dsam,
|
||||
int (*mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2,
|
||||
BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *mont));
|
||||
int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam))
|
||||
(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *mont);
|
||||
int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam,
|
||||
int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *mont));
|
||||
|
||||
DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam))(const unsigned char *,
|
||||
int, DSA *);
|
||||
int DSA_meth_set_sign(DSA_METHOD *dsam, DSA_SIG *(*sign)(const unsigned char *,
|
||||
int, DSA *));
|
||||
|
||||
int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))(DSA *, BN_CTX *,$
|
||||
BIGNUM **, BIGNUM **);
|
||||
int DSA_meth_set_sign_setup(DSA_METHOD *dsam, int (*sign_setup)(DSA *, BN_CTX *,
|
||||
BIGNUM **, BIGNUM **));
|
||||
|
||||
int (*DSA_meth_get_verify(const DSA_METHOD *dsam))(const unsigned char *,
|
||||
int, DSA_SIG *, DSA *);
|
||||
int DSA_meth_set_verify(DSA_METHOD *dsam, int (*verify)(const unsigned char *,
|
||||
int, DSA_SIG *, DSA *));
|
||||
|
||||
int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
|
||||
BIGNUM *p1, BIGNUM *a2, BIGNUM *p2,
|
||||
BIGNUM *m, BN_CTX *ctx,
|
||||
BN_MONT_CTX *in_mont);
|
||||
int DSA_meth_set_mod_exp(DSA_METHOD *dsam, int (*mod_exp)(DSA *dsa, BIGNUM *rr,
|
||||
BIGNUM *a1, BIGNUM *p1,
|
||||
BIGNUM *a2, BIGNUM *p2,
|
||||
BIGNUM *m, BN_CTX *ctx,
|
||||
BN_MONT_CTX *mont));
|
||||
|
||||
int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam))(DSA *dsa, BIGNUM *r, BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *mont);
|
||||
int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam, int (*bn_mod_exp)(DSA *dsa,
|
||||
BIGNUM *r,
|
||||
BIGNUM *a,
|
||||
const BIGNUM *p,
|
||||
const BIGNUM *m,
|
||||
BN_CTX *ctx,
|
||||
BN_MONT_CTX *mont));
|
||||
|
||||
int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *);
|
||||
int DSA_meth_set_init(DSA_METHOD *dsam, int (*init)(DSA *));
|
||||
int (*DSA_meth_get_finish(const DSA_METHOD *dsam)) (DSA *);
|
||||
int DSA_meth_set_finish(DSA_METHOD *dsam, int (*finish) (DSA *));
|
||||
int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam))
|
||||
(DSA *, int, const unsigned char *, int, int *, unsigned long *,
|
||||
BN_GENCB *);
|
||||
|
||||
int (*DSA_meth_get_finish(const DSA_METHOD *dsam))(DSA *);
|
||||
int DSA_meth_set_finish(DSA_METHOD *dsam, int (*finish)(DSA *));
|
||||
|
||||
int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam))(DSA *, int,
|
||||
const unsigned char *,
|
||||
int, int *, unsigned long *,
|
||||
BN_GENCB *);
|
||||
int DSA_meth_set_paramgen(DSA_METHOD *dsam,
|
||||
int (*paramgen) (DSA *, int, const unsigned char *, int, int *,
|
||||
unsigned long *, BN_GENCB *));
|
||||
int (*DSA_meth_get_keygen(const DSA_METHOD *dsam)) (DSA *);
|
||||
int DSA_meth_set_keygen(DSA_METHOD *dsam, int (*keygen) (DSA *));
|
||||
int (*paramgen)(DSA *, int, const unsigned char *,
|
||||
int, int *, unsigned long *, BN_GENCB *));
|
||||
|
||||
int (*DSA_meth_get_keygen(const DSA_METHOD *dsam))(DSA *);
|
||||
int DSA_meth_set_keygen(DSA_METHOD *dsam, int (*keygen)(DSA *));
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,13 +8,12 @@ DSA_sign, DSA_sign_setup, DSA_verify - DSA signatures
|
|||
|
||||
#include <openssl/dsa.h>
|
||||
|
||||
int DSA_sign(int type, const unsigned char *dgst, int len,
|
||||
unsigned char *sigret, unsigned int *siglen, DSA *dsa);
|
||||
int DSA_sign(int type, const unsigned char *dgst, int len,
|
||||
unsigned char *sigret, unsigned int *siglen, DSA *dsa);
|
||||
|
||||
int DSA_sign_setup(DSA *dsa, BN_CTX *ctx, BIGNUM **kinvp,
|
||||
BIGNUM **rp);
|
||||
int DSA_sign_setup(DSA *dsa, BN_CTX *ctx, BIGNUM **kinvp, BIGNUM **rp);
|
||||
|
||||
int DSA_verify(int type, const unsigned char *dgst, int len,
|
||||
int DSA_verify(int type, const unsigned char *dgst, int len,
|
||||
unsigned char *sigbuf, int siglen, DSA *dsa);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -139,6 +139,7 @@ specific)
|
|||
int ret;
|
||||
ECDSA_SIG *sig;
|
||||
EC_KEY *eckey;
|
||||
|
||||
eckey = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
|
||||
if (eckey == NULL)
|
||||
/* error */
|
||||
|
@ -156,6 +157,7 @@ or using ECDSA_sign():
|
|||
|
||||
unsigned char *buffer, *pp;
|
||||
int buf_len;
|
||||
|
||||
buf_len = ECDSA_size(eckey);
|
||||
buffer = OPENSSL_malloc(buf_len);
|
||||
pp = buffer;
|
||||
|
|
|
@ -23,7 +23,8 @@ EC_GROUP_get_pentanomial_basis
|
|||
|
||||
const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
|
||||
|
||||
int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor);
|
||||
int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
|
||||
const BIGNUM *order, const BIGNUM *cofactor);
|
||||
const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
|
||||
|
||||
int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
|
||||
|
@ -56,7 +57,7 @@ EC_GROUP_get_pentanomial_basis
|
|||
int EC_GROUP_get_basis_type(const EC_GROUP *);
|
||||
int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
|
||||
int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
|
||||
unsigned int *k2, unsigned int *k3);
|
||||
unsigned int *k2, unsigned int *k3);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -21,14 +21,20 @@ objects
|
|||
void EC_GROUP_free(EC_GROUP *group);
|
||||
void EC_GROUP_clear_free(EC_GROUP *group);
|
||||
|
||||
EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
|
||||
const BIGNUM *b, BN_CTX *ctx);
|
||||
EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
|
||||
const BIGNUM *b, BN_CTX *ctx);
|
||||
EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
|
||||
|
||||
int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
|
||||
int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
|
||||
int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p,
|
||||
const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p,
|
||||
BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
|
||||
int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p,
|
||||
const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p,
|
||||
BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
|
||||
|
||||
ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group, ECPARAMETERS *params)
|
||||
ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group, ECPKPARAMETERS *params)
|
||||
|
|
|
@ -41,13 +41,11 @@ EC_KEY objects
|
|||
int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
|
||||
int EC_KEY_generate_key(EC_KEY *key);
|
||||
int EC_KEY_check_key(const EC_KEY *key);
|
||||
int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key,
|
||||
BIGNUM *x, BIGNUM *y);
|
||||
int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, BIGNUM *y);
|
||||
const EC_KEY_METHOD *EC_KEY_get_method(const EC_KEY *key);
|
||||
int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth);
|
||||
|
||||
int EC_KEY_oct2key(EC_KEY *eckey, const unsigned char *buf, size_t len,
|
||||
BN_CTX *ctx);
|
||||
int EC_KEY_oct2key(EC_KEY *eckey, const unsigned char *buf, size_t len, BN_CTX *ctx);
|
||||
size_t EC_KEY_key2buf(const EC_KEY *eckey, point_conversion_form_t form,
|
||||
unsigned char **pbuf, BN_CTX *ctx);
|
||||
|
||||
|
|
|
@ -8,16 +8,20 @@ EC_POINT_add, EC_POINT_dbl, EC_POINT_invert, EC_POINT_is_at_infinity, EC_POINT_i
|
|||
|
||||
#include <openssl/ec.h>
|
||||
|
||||
int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx);
|
||||
int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
|
||||
const EC_POINT *b, BN_CTX *ctx);
|
||||
int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx);
|
||||
int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
|
||||
int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
|
||||
int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx);
|
||||
int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx);
|
||||
int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
|
||||
int EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx);
|
||||
int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, size_t num, const EC_POINT *p[], const BIGNUM *m[], BN_CTX *ctx);
|
||||
int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
|
||||
int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
|
||||
EC_POINT *points[], BN_CTX *ctx);
|
||||
int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, size_t num,
|
||||
const EC_POINT *p[], const BIGNUM *m[], BN_CTX *ctx);
|
||||
int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
|
||||
const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
|
||||
int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
|
||||
int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
|
||||
|
||||
|
|
|
@ -115,9 +115,9 @@ ENGINE_unregister_digests
|
|||
int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
|
||||
int ENGINE_cmd_is_executable(ENGINE *e, int cmd);
|
||||
int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
|
||||
long i, void *p, void (*f)(void), int cmd_optional);
|
||||
long i, void *p, void (*f)(void), int cmd_optional);
|
||||
int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
|
||||
int cmd_optional);
|
||||
int cmd_optional);
|
||||
|
||||
ENGINE *ENGINE_new(void);
|
||||
int ENGINE_free(ENGINE *e);
|
||||
|
@ -164,9 +164,9 @@ ENGINE_unregister_digests
|
|||
const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
|
||||
|
||||
EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
|
||||
UI_METHOD *ui_method, void *callback_data);
|
||||
UI_METHOD *ui_method, void *callback_data);
|
||||
EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
|
||||
UI_METHOD *ui_method, void *callback_data);
|
||||
UI_METHOD *ui_method, void *callback_data);
|
||||
|
||||
Deprecated:
|
||||
|
||||
|
@ -550,7 +550,7 @@ If an ENGINE specifies the ENGINE_FLAGS_MANUAL_CMD_CTRL flag, then it will
|
|||
simply pass all these "core" control commands directly to the ENGINE's ctrl()
|
||||
handler (and thus, it must have supplied one), so it is up to the ENGINE to
|
||||
reply to these "discovery" commands itself. If that flag is not set, then the
|
||||
OpenSSL framework code will work with the following rules;
|
||||
OpenSSL framework code will work with the following rules:
|
||||
|
||||
if no ctrl() handler supplied;
|
||||
ENGINE_HAS_CTRL_FUNCTION returns FALSE (zero),
|
||||
|
|
|
@ -20,11 +20,11 @@ ERR_peek_last_error_line_data - obtain error code and data
|
|||
unsigned long ERR_peek_last_error_line(const char **file, int *line);
|
||||
|
||||
unsigned long ERR_get_error_line_data(const char **file, int *line,
|
||||
const char **data, int *flags);
|
||||
const char **data, int *flags);
|
||||
unsigned long ERR_peek_error_line_data(const char **file, int *line,
|
||||
const char **data, int *flags);
|
||||
const char **data, int *flags);
|
||||
unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
|
||||
const char **data, int *flags);
|
||||
const char **data, int *flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@ ERR_print_errors, ERR_print_errors_fp, ERR_print_errors_cb
|
|||
|
||||
void ERR_print_errors(BIO *bp);
|
||||
void ERR_print_errors_fp(FILE *fp);
|
||||
void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
|
||||
void *u)
|
||||
void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u)
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -8,8 +8,7 @@ ERR_put_error, ERR_add_error_data, ERR_add_error_vdata - record an error
|
|||
|
||||
#include <openssl/err.h>
|
||||
|
||||
void ERR_put_error(int lib, int func, int reason, const char *file,
|
||||
int line);
|
||||
void ERR_put_error(int lib, int func, int reason, const char *file, int line);
|
||||
|
||||
void ERR_add_error_data(int num, ...);
|
||||
void ERR_add_error_vdata(int num, va_list arg);
|
||||
|
|
|
@ -24,26 +24,26 @@ EVP_CIPHER_meth_get_ctrl - Routines to build up EVP_CIPHER methods
|
|||
int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags);
|
||||
int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size);
|
||||
int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher,
|
||||
int (*init) (EVP_CIPHER_CTX *ctx,
|
||||
const unsigned char *key,
|
||||
const unsigned char *iv,
|
||||
int enc));
|
||||
int (*init)(EVP_CIPHER_CTX *ctx,
|
||||
const unsigned char *key,
|
||||
const unsigned char *iv,
|
||||
int enc));
|
||||
int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher,
|
||||
int (*do_cipher) (EVP_CIPHER_CTX *ctx,
|
||||
unsigned char *out,
|
||||
const unsigned char *in,
|
||||
size_t inl));
|
||||
int (*do_cipher)(EVP_CIPHER_CTX *ctx,
|
||||
unsigned char *out,
|
||||
const unsigned char *in,
|
||||
size_t inl));
|
||||
int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher,
|
||||
int (*cleanup) (EVP_CIPHER_CTX *));
|
||||
int (*cleanup)(EVP_CIPHER_CTX *));
|
||||
int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher,
|
||||
int (*set_asn1_parameters) (EVP_CIPHER_CTX *,
|
||||
ASN1_TYPE *));
|
||||
int (*set_asn1_parameters)(EVP_CIPHER_CTX *,
|
||||
ASN1_TYPE *));
|
||||
int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher,
|
||||
int (*get_asn1_parameters) (EVP_CIPHER_CTX *,
|
||||
ASN1_TYPE *));
|
||||
int (*get_asn1_parameters)(EVP_CIPHER_CTX *,
|
||||
ASN1_TYPE *));
|
||||
int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher,
|
||||
int (*ctrl) (EVP_CIPHER_CTX *, int type,
|
||||
int arg, void *ptr));
|
||||
int (*ctrl)(EVP_CIPHER_CTX *, int type,
|
||||
int arg, void *ptr));
|
||||
|
||||
int (*EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx,
|
||||
const unsigned char *key,
|
||||
|
@ -57,7 +57,7 @@ EVP_CIPHER_meth_get_ctrl - Routines to build up EVP_CIPHER methods
|
|||
int (*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
|
||||
ASN1_TYPE *);
|
||||
int (*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
|
||||
ASN1_TYPE *);
|
||||
ASN1_TYPE *);
|
||||
int (*EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
|
||||
int type, int arg,
|
||||
void *ptr);
|
||||
|
|
|
@ -22,14 +22,12 @@ EVP_get_digestbynid, EVP_get_digestbyobj - EVP digest routines
|
|||
|
||||
int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
|
||||
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
|
||||
int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md,
|
||||
unsigned int *s);
|
||||
int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
|
||||
|
||||
int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
|
||||
|
||||
int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
|
||||
int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
|
||||
unsigned int *s);
|
||||
int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
|
||||
|
||||
int EVP_MD_CTX_copy(EVP_MD_CTX *out, EVP_MD_CTX *in);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ EVP_DigestVerify - EVP signature verification functions
|
|||
#include <openssl/evp.h>
|
||||
|
||||
int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
|
||||
const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
|
||||
int EVP_DigestVerifyUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
|
||||
int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig,
|
||||
size_t siglen);
|
||||
|
|
|
@ -24,8 +24,7 @@ EVP_DecodeBlock - EVP base 64 encode/decode routines
|
|||
void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
|
||||
int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
|
||||
const unsigned char *in, int inl);
|
||||
int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
|
||||
char *out, int *outl);
|
||||
int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
|
||||
int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -45,40 +45,34 @@ EVP_chacha20, EVP_chacha20_poly1305 - EVP cipher routines
|
|||
void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx);
|
||||
|
||||
int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
|
||||
ENGINE *impl, unsigned char *key, unsigned char *iv);
|
||||
ENGINE *impl, unsigned char *key, unsigned char *iv);
|
||||
int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl);
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
|
||||
|
||||
int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
|
||||
ENGINE *impl, unsigned char *key, unsigned char *iv);
|
||||
ENGINE *impl, unsigned char *key, unsigned char *iv);
|
||||
int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm,
|
||||
int *outl);
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
|
||||
|
||||
int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
|
||||
ENGINE *impl, unsigned char *key, unsigned char *iv, int enc);
|
||||
ENGINE *impl, unsigned char *key, unsigned char *iv, int enc);
|
||||
int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm,
|
||||
int *outl);
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
|
||||
|
||||
int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
|
||||
unsigned char *key, unsigned char *iv);
|
||||
int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl);
|
||||
unsigned char *key, unsigned char *iv);
|
||||
int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
|
||||
|
||||
int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
|
||||
unsigned char *key, unsigned char *iv);
|
||||
int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
|
||||
int *outl);
|
||||
unsigned char *key, unsigned char *iv);
|
||||
int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
|
||||
|
||||
int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
|
||||
unsigned char *key, unsigned char *iv, int enc);
|
||||
int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
|
||||
int *outl);
|
||||
unsigned char *key, unsigned char *iv, int enc);
|
||||
int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
|
||||
|
||||
int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *x, int padding);
|
||||
int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
|
||||
|
|
|
@ -9,11 +9,10 @@ EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal - EVP envelope decryption
|
|||
#include <openssl/evp.h>
|
||||
|
||||
int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char *ek,
|
||||
int ekl, unsigned char *iv, EVP_PKEY *priv);
|
||||
int ekl, unsigned char *iv, EVP_PKEY *priv);
|
||||
int EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl);
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ EVP_PKEY_CTX_set_ec_param_enc - algorithm specific control operations
|
|||
#include <openssl/evp.h>
|
||||
|
||||
int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
|
||||
int cmd, int p1, void *p2);
|
||||
int cmd, int p1, void *p2);
|
||||
int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
|
||||
const char *value);
|
||||
const char *value);
|
||||
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ and seed value "seed":
|
|||
EVP_PKEY_CTX *pctx;
|
||||
unsigned char out[10];
|
||||
size_t outlen = sizeof(out);
|
||||
|
||||
pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_TLS1_PRF, NULL);
|
||||
if (EVP_PKEY_derive_init(pctx) <= 0)
|
||||
/* Error */
|
||||
|
|
|
@ -10,8 +10,8 @@ EVP_PKEY_decrypt_init, EVP_PKEY_decrypt - decrypt using a public key algorithm
|
|||
|
||||
int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen);
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -52,6 +52,7 @@ Decrypt data using OAEP (for RSA keys):
|
|||
unsigned char *out, *in;
|
||||
size_t outlen, inlen;
|
||||
EVP_PKEY *key;
|
||||
|
||||
/*
|
||||
* NB: assumes key in, inlen are already set up
|
||||
* and that key is an RSA private key
|
||||
|
|
|
@ -10,8 +10,8 @@ EVP_PKEY_encrypt_init, EVP_PKEY_encrypt - encrypt using a public key algorithm
|
|||
|
||||
int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen);
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -56,6 +56,7 @@ set 'eng = NULL;' to start with the default OpenSSL RSA implementation:
|
|||
unsigned char *out, *in;
|
||||
size_t outlen, inlen;
|
||||
EVP_PKEY *key;
|
||||
|
||||
/*
|
||||
* NB: assumes eng, key, in, inlen are already set up,
|
||||
* and that key is an RSA public key
|
||||
|
|
|
@ -98,6 +98,7 @@ Generate a 2048 bit RSA key:
|
|||
|
||||
EVP_PKEY_CTX *ctx;
|
||||
EVP_PKEY *pkey = NULL;
|
||||
|
||||
ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL);
|
||||
if (!ctx)
|
||||
/* Error occurred */
|
||||
|
@ -117,6 +118,7 @@ Generate a key from a set of parameters:
|
|||
|
||||
EVP_PKEY_CTX *ctx;
|
||||
EVP_PKEY *pkey = NULL, *param;
|
||||
|
||||
/* Assumed param is set up already */
|
||||
ctx = EVP_PKEY_CTX_new(param);
|
||||
if (!ctx)
|
||||
|
@ -139,6 +141,7 @@ Example of generation callback for OpenSSL public key implementations:
|
|||
char c = '*';
|
||||
BIO *b = EVP_PKEY_CTX_get_app_data(ctx);
|
||||
int p = EVP_PKEY_CTX_get_keygen_info(ctx, 0);
|
||||
|
||||
if (p == 0)
|
||||
c = '.';
|
||||
if (p == 1)
|
||||
|
|
|
@ -9,11 +9,11 @@ EVP_PKEY_print_public, EVP_PKEY_print_private, EVP_PKEY_print_params - public ke
|
|||
#include <openssl/evp.h>
|
||||
|
||||
int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
|
||||
int indent, ASN1_PCTX *pctx);
|
||||
int indent, ASN1_PCTX *pctx);
|
||||
int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
|
||||
int indent, ASN1_PCTX *pctx);
|
||||
int indent, ASN1_PCTX *pctx);
|
||||
int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
|
||||
int indent, ASN1_PCTX *pctx);
|
||||
int indent, ASN1_PCTX *pctx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ EVP_PKEY_sign_init, EVP_PKEY_sign - sign using a public key algorithm
|
|||
|
||||
int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *sig, size_t *siglen,
|
||||
const unsigned char *tbs, size_t tbslen);
|
||||
unsigned char *sig, size_t *siglen,
|
||||
const unsigned char *tbs, size_t tbslen);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ EVP_PKEY_verify_init, EVP_PKEY_verify - signature verification using a public ke
|
|||
|
||||
int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *sig, size_t siglen,
|
||||
const unsigned char *tbs, size_t tbslen);
|
||||
const unsigned char *sig, size_t siglen,
|
||||
const unsigned char *tbs, size_t tbslen);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -55,6 +55,7 @@ Verify signature using PKCS#1 and SHA256 digest:
|
|||
unsigned char *md, *sig;
|
||||
size_t mdlen, siglen;
|
||||
EVP_PKEY *verify_key;
|
||||
|
||||
/*
|
||||
* NB: assumes verify_key, sig, siglen md and mdlen are already set up
|
||||
* and that verify_key is an RSA public key
|
||||
|
|
|
@ -10,8 +10,8 @@ EVP_PKEY_verify_recover_init, EVP_PKEY_verify_recover - recover signature using
|
|||
|
||||
int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *rout, size_t *routlen,
|
||||
const unsigned char *sig, size_t siglen);
|
||||
unsigned char *rout, size_t *routlen,
|
||||
const unsigned char *sig, size_t siglen);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -60,6 +60,7 @@ Recover digest originally signed using PKCS#1 and SHA256 digest:
|
|||
unsigned char *rout, *sig;
|
||||
size_t routlen, siglen;
|
||||
EVP_PKEY *verify_key;
|
||||
|
||||
/*
|
||||
* NB: assumes verify_key, sig and siglen are already set up
|
||||
* and that verify_key is an RSA public key
|
||||
|
|
|
@ -12,9 +12,8 @@ EVP_SealInit, EVP_SealUpdate, EVP_SealFinal - EVP envelope encryption
|
|||
unsigned char **ek, int *ekl, unsigned char *iv,
|
||||
EVP_PKEY **pubk, int npubk);
|
||||
int EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
int *outl);
|
||||
int *outl, unsigned char *in, int inl);
|
||||
int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ EVP_VerifyInit, EVP_VerifyUpdate, EVP_VerifyFinal
|
|||
|
||||
int EVP_VerifyInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
|
||||
int EVP_VerifyUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt);
|
||||
int EVP_VerifyFinal(EVP_MD_CTX *ctx, unsigned char *sigbuf, unsigned int siglen, EVP_PKEY *pkey);
|
||||
int EVP_VerifyFinal(EVP_MD_CTX *ctx, unsigned char *sigbuf, unsigned int siglen,
|
||||
EVP_PKEY *pkey);
|
||||
|
||||
int EVP_VerifyInit(EVP_MD_CTX *ctx, const EVP_MD *type);
|
||||
|
||||
|
|
|
@ -21,14 +21,14 @@ HMAC_size
|
|||
#include <openssl/hmac.h>
|
||||
|
||||
unsigned char *HMAC(const EVP_MD *evp_md, const void *key,
|
||||
int key_len, const unsigned char *d, int n,
|
||||
unsigned char *md, unsigned int *md_len);
|
||||
int key_len, const unsigned char *d, int n,
|
||||
unsigned char *md, unsigned int *md_len);
|
||||
|
||||
HMAC_CTX *HMAC_CTX_new(void);
|
||||
int HMAC_CTX_reset(HMAC_CTX *ctx);
|
||||
|
||||
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int key_len,
|
||||
const EVP_MD *md, ENGINE *impl);
|
||||
const EVP_MD *md, ENGINE *impl);
|
||||
int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len);
|
||||
int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
|
||||
|
||||
|
|
|
@ -9,34 +9,28 @@ MD4_Final, MD5_Init, MD5_Update, MD5_Final - MD2, MD4, and MD5 hash functions
|
|||
|
||||
#include <openssl/md2.h>
|
||||
|
||||
unsigned char *MD2(const unsigned char *d, unsigned long n,
|
||||
unsigned char *md);
|
||||
unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md);
|
||||
|
||||
int MD2_Init(MD2_CTX *c);
|
||||
int MD2_Update(MD2_CTX *c, const unsigned char *data,
|
||||
unsigned long len);
|
||||
int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len);
|
||||
int MD2_Final(unsigned char *md, MD2_CTX *c);
|
||||
|
||||
|
||||
#include <openssl/md4.h>
|
||||
|
||||
unsigned char *MD4(const unsigned char *d, unsigned long n,
|
||||
unsigned char *md);
|
||||
unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
|
||||
|
||||
int MD4_Init(MD4_CTX *c);
|
||||
int MD4_Update(MD4_CTX *c, const void *data,
|
||||
unsigned long len);
|
||||
int MD4_Update(MD4_CTX *c, const void *data, unsigned long len);
|
||||
int MD4_Final(unsigned char *md, MD4_CTX *c);
|
||||
|
||||
|
||||
#include <openssl/md5.h>
|
||||
|
||||
unsigned char *MD5(const unsigned char *d, unsigned long n,
|
||||
unsigned char *md);
|
||||
unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md);
|
||||
|
||||
int MD5_Init(MD5_CTX *c);
|
||||
int MD5_Update(MD5_CTX *c, const void *data,
|
||||
unsigned long len);
|
||||
int MD5_Update(MD5_CTX *c, const void *data, unsigned long len);
|
||||
int MD5_Final(unsigned char *md, MD5_CTX *c);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -9,11 +9,11 @@ MDC2, MDC2_Init, MDC2_Update, MDC2_Final - MDC2 hash function
|
|||
#include <openssl/mdc2.h>
|
||||
|
||||
unsigned char *MDC2(const unsigned char *d, unsigned long n,
|
||||
unsigned char *md);
|
||||
unsigned char *md);
|
||||
|
||||
int MDC2_Init(MDC2_CTX *c);
|
||||
int MDC2_Update(MDC2_CTX *c, const unsigned char *data,
|
||||
unsigned long len);
|
||||
unsigned long len);
|
||||
int MDC2_Final(unsigned char *md, MDC2_CTX *c);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -137,8 +137,7 @@ The latter cannot be constant because it needs to be freed after use.
|
|||
|
||||
Create an object for B<commonName>:
|
||||
|
||||
ASN1_OBJECT *o;
|
||||
o = OBJ_nid2obj(NID_commonName);
|
||||
ASN1_OBJECT *o = OBJ_nid2obj(NID_commonName);
|
||||
|
||||
Check if an object is B<commonName>
|
||||
|
||||
|
@ -147,12 +146,8 @@ Check if an object is B<commonName>
|
|||
|
||||
Create a new NID and initialize an object from it:
|
||||
|
||||
int new_nid;
|
||||
ASN1_OBJECT *obj;
|
||||
|
||||
new_nid = OBJ_create("1.2.3.4", "NewOID", "New Object Identifier");
|
||||
|
||||
obj = OBJ_nid2obj(new_nid);
|
||||
int new_nid = OBJ_create("1.2.3.4", "NewOID", "New Object Identifier");
|
||||
ASN1_OBJECT *obj = OBJ_nid2obj(new_nid);
|
||||
|
||||
Create a new object directly:
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@ OPENSSL_MALLOC_FD
|
|||
void CRYPTO_free(void *str, const char *, int)
|
||||
char *CRYPTO_strdup(const char *p, const char *file, int line)
|
||||
char *CRYPTO_strndup(const char *p, size_t num, const char *file, int line)
|
||||
void *CRYPTO_clear_realloc(void *p, size_t old_len, size_t num, const char *file, int line)
|
||||
void *CRYPTO_clear_realloc(void *p, size_t old_len, size_t num,
|
||||
const char *file, int line)
|
||||
void CRYPTO_clear_free(void *str, size_t num, const char *, int)
|
||||
|
||||
void CRYPTO_get_mem_functions(
|
||||
|
|
|
@ -305,6 +305,7 @@ most of them are set to 0 or NULL.
|
|||
Read a certificate in PEM format from a BIO:
|
||||
|
||||
X509 *x;
|
||||
|
||||
x = PEM_read_bio_X509(bp, NULL, 0, NULL);
|
||||
if (x == NULL)
|
||||
/* Error */
|
||||
|
@ -312,6 +313,7 @@ Read a certificate in PEM format from a BIO:
|
|||
Alternative method:
|
||||
|
||||
X509 *x = NULL;
|
||||
|
||||
if (!PEM_read_bio_X509(bp, &x, 0, NULL))
|
||||
/* Error */
|
||||
|
||||
|
@ -377,6 +379,7 @@ A frequent cause of problems is attempting to use the PEM routines like
|
|||
this:
|
||||
|
||||
X509 *x;
|
||||
|
||||
PEM_read_bio_X509(bp, &x, 0, NULL);
|
||||
|
||||
this is a bug because an attempt will be made to reuse the data at B<x>
|
||||
|
|
|
@ -49,6 +49,7 @@ the result to a new file.
|
|||
{
|
||||
FILE *fp;
|
||||
PKCS12 *p12;
|
||||
|
||||
if (argc != 5) {
|
||||
fprintf(stderr, "Usage: pkread p12file password newpass opfile\n");
|
||||
return 1;
|
||||
|
|
|
@ -13,9 +13,9 @@ PKCS5_PBKDF2_HMAC, PKCS5_PBKDF2_HMAC_SHA1 - password based derivation routines w
|
|||
const EVP_MD *digest,
|
||||
int keylen, unsigned char *out);
|
||||
|
||||
int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
|
||||
const unsigned char *salt, int saltlen, int iter,
|
||||
int keylen, unsigned char *out);
|
||||
int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
|
||||
const unsigned char *salt, int saltlen, int iter,
|
||||
int keylen, unsigned char *out);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ PKCS7_encrypt - create a PKCS#7 envelopedData structure
|
|||
|
||||
#include <openssl/pkcs7.h>
|
||||
|
||||
PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, int flags);
|
||||
PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
|
||||
int flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ PKCS7_sign - create a PKCS#7 signedData structure
|
|||
|
||||
#include <openssl/pkcs7.h>
|
||||
|
||||
PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, int flags);
|
||||
PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
BIO *data, int flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -65,7 +66,6 @@ way data can be signed in a single pass.
|
|||
If the B<PKCS7_PARTIAL> flag is set a partial B<PKCS7> structure is output to
|
||||
which additional signers and capabilities can be added before finalization.
|
||||
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
If the flag B<PKCS7_STREAM> is set the returned B<PKCS7> structure is B<not>
|
||||
|
|
|
@ -8,7 +8,8 @@ PKCS7_sign_add_signer - add a signer PKCS7 signed data structure
|
|||
|
||||
#include <openssl/pkcs7.h>
|
||||
|
||||
PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert, EVP_PKEY *pkey, const EVP_MD *md, int flags);
|
||||
PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert,
|
||||
EVP_PKEY *pkey, const EVP_MD *md, int flags);
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -8,7 +8,8 @@ PKCS7_verify, PKCS7_get0_signers - verify a PKCS#7 signedData structure
|
|||
|
||||
#include <openssl/pkcs7.h>
|
||||
|
||||
int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, BIO *indata, BIO *out, int flags);
|
||||
int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
|
||||
BIO *indata, BIO *out, int flags);
|
||||
|
||||
STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
|
||||
|
||||
|
|
|
@ -10,11 +10,10 @@ RIPEMD-160 hash function
|
|||
#include <openssl/ripemd.h>
|
||||
|
||||
unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
|
||||
unsigned char *md);
|
||||
unsigned char *md);
|
||||
|
||||
int RIPEMD160_Init(RIPEMD160_CTX *c);
|
||||
int RIPEMD160_Update(RIPEMD_CTX *c, const void *data,
|
||||
unsigned long len);
|
||||
int RIPEMD160_Update(RIPEMD_CTX *c, const void *data, unsigned long len);
|
||||
int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -14,7 +14,7 @@ Deprecated:
|
|||
|
||||
#if OPENSSL_API_COMPAT < 0x00908000L
|
||||
RSA *RSA_generate_key(int num, unsigned long e,
|
||||
void (*callback)(int, int, void *), void *cb_arg);
|
||||
void (*callback)(int, int, void *), void *cb_arg);
|
||||
#endif
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -21,88 +21,95 @@ RSA_meth_set_verify, RSA_meth_get_keygen, RSA_meth_set_keygen
|
|||
|
||||
RSA_METHOD *RSA_meth_new(const char *name, int flags);
|
||||
void RSA_meth_free(RSA_METHOD *meth);
|
||||
|
||||
RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
|
||||
|
||||
const char *RSA_meth_get0_name(const RSA_METHOD *meth);
|
||||
int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
|
||||
|
||||
int RSA_meth_get_flags(RSA_METHOD *meth);
|
||||
int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
|
||||
|
||||
void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
|
||||
int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data);
|
||||
int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))
|
||||
(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
|
||||
int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
int RSA_meth_set_pub_enc(RSA_METHOD *rsa,
|
||||
int (*pub_enc) (int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa,
|
||||
int padding));
|
||||
int (*pub_enc)(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa,
|
||||
int padding));
|
||||
|
||||
int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))
|
||||
(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
int RSA_meth_set_pub_dec(RSA_METHOD *rsa,
|
||||
int (*pub_dec) (int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa,
|
||||
int padding));
|
||||
int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))
|
||||
(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
int (*pub_dec)(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa,
|
||||
int padding));
|
||||
|
||||
int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa,
|
||||
int padding);
|
||||
int RSA_meth_set_priv_enc(RSA_METHOD *rsa,
|
||||
int (*priv_enc) (int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa,
|
||||
int padding));
|
||||
int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))
|
||||
(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
int (*priv_enc)(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding));
|
||||
|
||||
int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa,
|
||||
int padding);
|
||||
int RSA_meth_set_priv_dec(RSA_METHOD *rsa,
|
||||
int (*priv_dec) (int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa,
|
||||
int padding));
|
||||
/* Can be null */
|
||||
int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))
|
||||
(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
|
||||
int (*priv_dec)(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding));
|
||||
|
||||
/* Can be null */
|
||||
int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *I,
|
||||
RSA *rsa, BN_CTX *ctx);
|
||||
int RSA_meth_set_mod_exp(RSA_METHOD *rsa,
|
||||
int (*mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa,
|
||||
BN_CTX *ctx));
|
||||
/* Can be null */
|
||||
int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))
|
||||
(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int (*mod_exp)(BIGNUM *r0, const BIGNUM *I, RSA *rsa,
|
||||
BN_CTX *ctx));
|
||||
|
||||
/* Can be null */
|
||||
int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r, const BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa,
|
||||
int (*bn_mod_exp) (BIGNUM *r,
|
||||
const BIGNUM *a,
|
||||
const BIGNUM *p,
|
||||
const BIGNUM *m,
|
||||
BN_CTX *ctx,
|
||||
BN_MONT_CTX *m_ctx));
|
||||
/* called at new */
|
||||
int (*RSA_meth_get_init(const RSA_METHOD *meth)) (RSA *rsa);
|
||||
int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa));
|
||||
/* called at free */
|
||||
int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa);
|
||||
int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa));
|
||||
int (*RSA_meth_get_sign(const RSA_METHOD *meth))
|
||||
(int type,
|
||||
const unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigret, unsigned int *siglen,
|
||||
const RSA *rsa);
|
||||
int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *m_ctx));
|
||||
|
||||
/* called at new */
|
||||
int (*RSA_meth_get_init(const RSA_METHOD *meth) (RSA *rsa);
|
||||
int RSA_meth_set_init(RSA_METHOD *rsa, int (*init (RSA *rsa));
|
||||
|
||||
/* called at free */
|
||||
int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa);
|
||||
int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish)(RSA *rsa));
|
||||
|
||||
int (*RSA_meth_get_sign(const RSA_METHOD *meth))(int type, const unsigned char *m,
|
||||
unsigned int m_length,
|
||||
unsigned char *sigret,
|
||||
unsigned int *siglen, const RSA *rsa);
|
||||
int RSA_meth_set_sign(RSA_METHOD *rsa,
|
||||
int (*sign) (int type, const unsigned char *m,
|
||||
unsigned int m_length,
|
||||
unsigned char *sigret, unsigned int *siglen,
|
||||
const RSA *rsa));
|
||||
int (*RSA_meth_get_verify(const RSA_METHOD *meth))
|
||||
(int dtype, const unsigned char *m,
|
||||
unsigned int m_length, const unsigned char *sigbuf,
|
||||
unsigned int siglen, const RSA *rsa);
|
||||
int (*sign)(int type, const unsigned char *m,
|
||||
unsigned int m_length, unsigned char *sigret,
|
||||
unsigned int *siglen, const RSA *rsa));
|
||||
|
||||
int (*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype, const unsigned char *m,
|
||||
unsigned int m_length,
|
||||
const unsigned char *sigbuf,
|
||||
unsigned int siglen, const RSA *rsa);
|
||||
int RSA_meth_set_verify(RSA_METHOD *rsa,
|
||||
int (*verify) (int dtype, const unsigned char *m,
|
||||
unsigned int m_length,
|
||||
const unsigned char *sigbuf,
|
||||
unsigned int siglen, const RSA *rsa));
|
||||
int (*RSA_meth_get_keygen(const RSA_METHOD *meth))
|
||||
(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
|
||||
int (*verify)(int dtype, const unsigned char *m,
|
||||
unsigned int m_length,
|
||||
const unsigned char *sigbuf,
|
||||
unsigned int siglen, const RSA *rsa));
|
||||
|
||||
int (*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e,
|
||||
BN_GENCB *cb);
|
||||
int RSA_meth_set_keygen(RSA_METHOD *rsa,
|
||||
int (*keygen) (RSA *rsa, int bits, BIGNUM *e,
|
||||
BN_GENCB *cb));
|
||||
int (*keygen)(RSA *rsa, int bits, BIGNUM *e,
|
||||
BN_GENCB *cb));
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ RSA_new, RSA_free - allocate and free RSA objects
|
|||
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
RSA * RSA_new(void);
|
||||
RSA *RSA_new(void);
|
||||
|
||||
void RSA_free(RSA *rsa);
|
||||
|
||||
|
|
|
@ -14,34 +14,35 @@ padding
|
|||
#include <openssl/rsa.h>
|
||||
|
||||
int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl);
|
||||
unsigned char *f, int fl);
|
||||
|
||||
int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl, int rsa_len);
|
||||
unsigned char *f, int fl, int rsa_len);
|
||||
|
||||
int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl);
|
||||
unsigned char *f, int fl);
|
||||
|
||||
int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl, int rsa_len);
|
||||
unsigned char *f, int fl, int rsa_len);
|
||||
|
||||
int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl, unsigned char *p, int pl);
|
||||
unsigned char *f, int fl, unsigned char *p, int pl);
|
||||
|
||||
int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl, int rsa_len, unsigned char *p, int pl);
|
||||
unsigned char *f, int fl, int rsa_len,
|
||||
unsigned char *p, int pl);
|
||||
|
||||
int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl);
|
||||
unsigned char *f, int fl);
|
||||
|
||||
int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl, int rsa_len);
|
||||
unsigned char *f, int fl, int rsa_len);
|
||||
|
||||
int RSA_padding_add_none(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl);
|
||||
unsigned char *f, int fl);
|
||||
|
||||
int RSA_padding_check_none(unsigned char *to, int tlen,
|
||||
unsigned char *f, int fl, int rsa_len);
|
||||
unsigned char *f, int fl, int rsa_len);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@ RSA_private_encrypt, RSA_public_decrypt - low level signature operations
|
|||
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
int RSA_private_encrypt(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
int RSA_private_encrypt(int flen, unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
|
||||
int RSA_public_decrypt(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
int RSA_public_decrypt(int flen, unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@ RSA_public_encrypt, RSA_private_decrypt - RSA public key cryptography
|
|||
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
int RSA_public_encrypt(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
int RSA_public_encrypt(int flen, unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
|
||||
int RSA_private_decrypt(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
int RSA_private_decrypt(int flen, unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ RSA_sign, RSA_verify - RSA signatures
|
|||
#include <openssl/rsa.h>
|
||||
|
||||
int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
|
||||
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
|
||||
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
|
||||
|
||||
int RSA_verify(int type, const unsigned char *m, unsigned int m_len,
|
||||
unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
|
||||
unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA signatures
|
|||
#include <openssl/rsa.h>
|
||||
|
||||
int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
|
||||
unsigned int m_len, unsigned char *sigret, unsigned int *siglen,
|
||||
RSA *rsa);
|
||||
unsigned int m_len, unsigned char *sigret,
|
||||
unsigned int *siglen, RSA *rsa);
|
||||
|
||||
int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
|
||||
unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
|
||||
RSA *rsa);
|
||||
unsigned int m_len, unsigned char *sigbuf,
|
||||
unsigned int siglen, RSA *rsa);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -15,31 +15,31 @@ SHA512_Final - Secure Hash Algorithm
|
|||
int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
|
||||
int SHA1_Final(unsigned char *md, SHA_CTX *c);
|
||||
unsigned char *SHA1(const unsigned char *d, size_t n,
|
||||
unsigned char *md);
|
||||
unsigned char *md);
|
||||
|
||||
int SHA224_Init(SHA256_CTX *c);
|
||||
int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
|
||||
int SHA224_Final(unsigned char *md, SHA256_CTX *c);
|
||||
unsigned char *SHA224(const unsigned char *d, size_t n,
|
||||
unsigned char *md);
|
||||
unsigned char *md);
|
||||
|
||||
int SHA256_Init(SHA256_CTX *c);
|
||||
int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
|
||||
int SHA256_Final(unsigned char *md, SHA256_CTX *c);
|
||||
unsigned char *SHA256(const unsigned char *d, size_t n,
|
||||
unsigned char *md);
|
||||
unsigned char *md);
|
||||
|
||||
int SHA384_Init(SHA512_CTX *c);
|
||||
int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
|
||||
int SHA384_Final(unsigned char *md, SHA512_CTX *c);
|
||||
unsigned char *SHA384(const unsigned char *d, size_t n,
|
||||
unsigned char *md);
|
||||
unsigned char *md);
|
||||
|
||||
int SHA512_Init(SHA512_CTX *c);
|
||||
int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
|
||||
int SHA512_Final(unsigned char *md, SHA512_CTX *c);
|
||||
unsigned char *SHA512(const unsigned char *d, size_t n,
|
||||
unsigned char *md);
|
||||
unsigned char *md);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -11,18 +11,20 @@ SSL_CTX_sess_set_new_cb, SSL_CTX_sess_set_remove_cb, SSL_CTX_sess_set_get_cb, SS
|
|||
void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,
|
||||
int (*new_session_cb)(SSL *, SSL_SESSION *));
|
||||
void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx,
|
||||
void (*remove_session_cb)(SSL_CTX *ctx, SSL_SESSION *));
|
||||
void (*remove_session_cb)(SSL_CTX *ctx,
|
||||
SSL_SESSION *));
|
||||
void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
|
||||
SSL_SESSION (*get_session_cb)(SSL *, const unsigned char *, int, int *));
|
||||
SSL_SESSION (*get_session_cb)(SSL *,
|
||||
const unsigned char *,
|
||||
int, int *));
|
||||
|
||||
int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl, SSL_SESSION *sess);
|
||||
void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx, SSL_SESSION *sess);
|
||||
SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, const unsigned char *data, int len, int *copy);
|
||||
|
||||
int (*new_session_cb)(struct ssl_st *ssl, SSL_SESSION *sess);
|
||||
void (*remove_session_cb)(struct ssl_ctx_st *ctx, SSL_SESSION *sess);
|
||||
SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, unsigned char *data,
|
||||
int len, int *copy);
|
||||
int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl,
|
||||
SSL_SESSION *sess);
|
||||
void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx,
|
||||
SSL_SESSION *sess);
|
||||
SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl,
|
||||
const unsigned char *data,
|
||||
int len, int *copy);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ SSL_CTX_set_cert_cb, SSL_set_cert_cb - handle certificate callback function
|
|||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cert_cb)(SSL *ssl, void *arg), void *arg);
|
||||
void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cert_cb)(SSL *ssl, void *arg),
|
||||
void *arg);
|
||||
void SSL_set_cert_cb(SSL *s, int (*cert_cb)(SSL *ssl, void *arg), void *arg);
|
||||
|
||||
int (*cert_cb)(SSL *ssl, void *arg);
|
||||
|
|
|
@ -8,7 +8,9 @@ SSL_CTX_set_cert_verify_callback - set peer certificate verification procedure
|
|||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*callback)(X509_STORE_CTX *, void *), void *arg);
|
||||
void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx,
|
||||
int (*callback)(X509_STORE_CTX *, void *),
|
||||
void *arg);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -8,8 +8,11 @@ SSL_CTX_set_client_cert_cb, SSL_CTX_get_client_cert_cb - handle client certifica
|
|||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));
|
||||
int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
|
||||
void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx,
|
||||
int (*client_cert_cb)(SSL *ssl, X509 **x509,
|
||||
EVP_PKEY **pkey));
|
||||
int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509,
|
||||
EVP_PKEY **pkey);
|
||||
int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -94,6 +94,7 @@ server id given, and will fill the rest with pseudo random bytes:
|
|||
unsigned int *id_len)
|
||||
{
|
||||
unsigned int count = 0;
|
||||
|
||||
do {
|
||||
RAND_pseudo_bytes(id, *id_len);
|
||||
/*
|
||||
|
|
|
@ -12,6 +12,7 @@ and maximum supported protocol version
|
|||
|
||||
int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
|
||||
int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
|
||||
|
||||
int SSL_set_min_proto_version(SSL *ssl, int version);
|
||||
int SSL_set_max_proto_version(SSL *ssl, int version);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue