X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=doc%2Fcrypto%2Fdh.pod;h=c3ccd062078304ad6f237417dae48047bfe0c4f8;hb=64cee65ebc4a5a23d9f6d6f73cb25e78a80af5c2;hp=ce32555367c7953498b844d03c6d15438025c122;hpb=bb075f883356589425b7e57f788c7498a83b0219;p=oweals%2Fopenssl.git diff --git a/doc/crypto/dh.pod b/doc/crypto/dh.pod index ce32555367..c3ccd06207 100644 --- a/doc/crypto/dh.pod +++ b/doc/crypto/dh.pod @@ -7,35 +7,36 @@ dh - Diffie-Hellman key agreement =head1 SYNOPSIS #include - - void DH_set_default_method(DH_METHOD *meth); - DH_METHOD *DH_get_default_method(void); - DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); - DH *DH_new_method(DH_METHOD *meth); - DH_METHOD *DH_OpenSSL(void); + #include DH * DH_new(void); void DH_free(DH *dh); - int DH_size(DH *dh); - - int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(), - int (*dup_func)(), void (*free_func)()); - int DH_set_ex_data(DH *d, int idx, char *arg); - char *DH_get_ex_data(DH *d, int idx); + int DH_size(const DH *dh); DH * DH_generate_parameters(int prime_len, int generator, void (*callback)(int, int, void *), void *cb_arg); - int DH_check(DH *dh, int *codes); + int DH_check(const DH *dh, int *codes); int DH_generate_key(DH *dh); int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); + void DH_set_default_method(const DH_METHOD *meth); + const DH_METHOD *DH_get_default_method(void); + int DH_set_method(DH *dh, const DH_METHOD *meth); + DH *DH_new_method(ENGINE *engine); + const DH_METHOD *DH_OpenSSL(void); + + int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(), + int (*dup_func)(), void (*free_func)()); + int DH_set_ex_data(DH *d, int idx, char *arg); + char *DH_get_ex_data(DH *d, int idx); + DH * d2i_DHparams(DH **a, unsigned char **pp, long length); - int i2d_DHparams(DH *a, unsigned char **pp); + int i2d_DHparams(const DH *a, unsigned char **pp); - int DHparams_print_fp(FILE *fp, DH *x); - int DHparams_print(BIO *bp, DH *x); + int DHparams_print_fp(FILE *fp, const DH *x); + int DHparams_print(BIO *bp, const DH *x); =head1 DESCRIPTION @@ -56,11 +57,20 @@ The B structure consists of several BIGNUM components. }; DH +Note that DH keys may use non-standard B implementations, +either directly or by the use of B modules. In some cases (eg. an +ENGINE providing support for hardware-embedded keys), these BIGNUM values +will not be used by the implementation or may be used for alternative data +storage. For this reason, applications should generally avoid using DH +structure elements directly and instead use API functions to query or +modify keys. + =head1 SEE ALSO L, L, L, L, -L, L, L, -L, L, +L, L, L, +L, L, +L, L, L, L, L