X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=lib%2Fopenssl%2Fdoc%2Fcrypto%2FEVP_PKEY_derive.pod;h=f70a0b8d9b888b525f26f2c57b9273064b3cca9b;hb=02ed66432c92de70694700164f986190aad3cbc5;hp=27464be5718e9385a19c9adc1261e79cf08b4ebb;hpb=89016837dcbf2775cd15dc8cbaba00dc6379f86e;p=cassiopeia.git diff --git a/lib/openssl/doc/crypto/EVP_PKEY_derive.pod b/lib/openssl/doc/crypto/EVP_PKEY_derive.pod index 27464be..f70a0b8 100644 --- a/lib/openssl/doc/crypto/EVP_PKEY_derive.pod +++ b/lib/openssl/doc/crypto/EVP_PKEY_derive.pod @@ -2,7 +2,7 @@ =head1 NAME -EVP_PKEY_derive_init, EVP_PKEY_derive_set_peer, EVP_PKEY_derive - derive public key algorithm shared secret. +EVP_PKEY_derive_init, EVP_PKEY_derive_set_peer, EVP_PKEY_derive - derive public key algorithm shared secret =head1 SYNOPSIS @@ -57,37 +57,46 @@ Derive shared secret (for example DH or EC keys): ctx = EVP_PKEY_CTX_new(pkey); if (!ctx) - /* Error occurred */ + /* Error occurred */ if (EVP_PKEY_derive_init(ctx) <= 0) - /* Error */ + /* Error */ if (EVP_PKEY_derive_set_peer(ctx, peerkey) <= 0) - /* Error */ + /* Error */ /* Determine buffer length */ if (EVP_PKEY_derive(ctx, NULL, &skeylen) <= 0) - /* Error */ + /* Error */ skey = OPENSSL_malloc(skeylen); if (!skey) - /* malloc failure */ - + /* malloc failure */ + if (EVP_PKEY_derive(ctx, skey, &skeylen) <= 0) - /* Error */ + /* Error */ /* Shared secret is skey bytes written to buffer skey */ =head1 SEE ALSO -L, -L, -L, -L, -L, -L, +L, +L, +L, +L, +L, +L, =head1 HISTORY These functions were first added to OpenSSL 1.0.0. +=head1 COPYRIGHT + +Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. + =cut