X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=lib%2Fopenssl%2Fdoc%2Fcrypto%2FEVP_PKEY_decrypt.pod;fp=lib%2Fopenssl%2Fdoc%2Fcrypto%2FEVP_PKEY_decrypt.pod;h=ca732ed0f91801db319811552b87d1a776f4f86b;hb=02ed66432c92de70694700164f986190aad3cbc5;hp=847983237b9baf7b5db1596786cf741f96e5d7eb;hpb=89016837dcbf2775cd15dc8cbaba00dc6379f86e;p=cassiopeia.git diff --git a/lib/openssl/doc/crypto/EVP_PKEY_decrypt.pod b/lib/openssl/doc/crypto/EVP_PKEY_decrypt.pod index 8479832..ca732ed 100644 --- a/lib/openssl/doc/crypto/EVP_PKEY_decrypt.pod +++ b/lib/openssl/doc/crypto/EVP_PKEY_decrypt.pod @@ -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 @@ -50,44 +50,53 @@ Decrypt data using OAEP (for RSA keys): EVP_PKEY_CTX *ctx; unsigned char *out, *in; - size_t outlen, inlen; + size_t outlen, inlen; EVP_PKEY *key; /* NB: assumes key in, inlen are already set up * and that key is an RSA private key */ ctx = EVP_PKEY_CTX_new(key); if (!ctx) - /* Error occurred */ + /* Error occurred */ if (EVP_PKEY_decrypt_init(ctx) <= 0) - /* Error */ + /* Error */ if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_OAEP_PADDING) <= 0) - /* Error */ + /* Error */ /* Determine buffer length */ if (EVP_PKEY_decrypt(ctx, NULL, &outlen, in, inlen) <= 0) - /* Error */ + /* Error */ out = OPENSSL_malloc(outlen); if (!out) - /* malloc failure */ - + /* malloc failure */ + if (EVP_PKEY_decrypt(ctx, out, &outlen, in, inlen) <= 0) - /* Error */ + /* Error */ /* Decrypted data is outlen bytes written to buffer out */ =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