diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/doc/EC_POINT_new.pod | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_get_error.pod | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/EVP_PKEY_derive.pod | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/EVP_PKEY_sign.pod | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/d2i_X509.pod | 10 | 
8 files changed, 12 insertions, 12 deletions
| diff --git a/src/lib/libcrypto/doc/EC_POINT_new.pod b/src/lib/libcrypto/doc/EC_POINT_new.pod index 69eb0d1a09..b41ca0ed0c 100644 --- a/src/lib/libcrypto/doc/EC_POINT_new.pod +++ b/src/lib/libcrypto/doc/EC_POINT_new.pod | |||
| @@ -91,7 +91,7 @@ The function EC_POINT_point2oct must be supplied with a buffer long enough to st | |||
| 91 | octets stored. Calling the function with a NULL buffer will not perform the conversion but will still return the required buffer length. | 91 | octets stored. Calling the function with a NULL buffer will not perform the conversion but will still return the required buffer length. | 
| 92 | 92 | ||
| 93 | The function EC_POINT_point2hex will allocate sufficient memory to store the hexadecimal string. It is the caller's responsibility to free | 93 | The function EC_POINT_point2hex will allocate sufficient memory to store the hexadecimal string. It is the caller's responsibility to free | 
| 94 | this memory with a subsequent call to OPENSSL_free(). | 94 | this memory with a subsequent call to free(). | 
| 95 | 95 | ||
| 96 | =head1 RETURN VALUES | 96 | =head1 RETURN VALUES | 
| 97 | 97 | ||
| diff --git a/src/lib/libcrypto/doc/ERR_get_error.pod b/src/lib/libcrypto/doc/ERR_get_error.pod index 01e196c95f..460a79f3f6 100644 --- a/src/lib/libcrypto/doc/ERR_get_error.pod +++ b/src/lib/libcrypto/doc/ERR_get_error.pod | |||
| @@ -55,7 +55,7 @@ and *B<flags>, unless these are B<NULL>. *B<data> contains a string | |||
| 55 | if *B<flags>&B<ERR_TXT_STRING> is true. | 55 | if *B<flags>&B<ERR_TXT_STRING> is true. | 
| 56 | 56 | ||
| 57 | An application B<MUST NOT> free the *B<data> pointer (or any other pointers | 57 | An application B<MUST NOT> free the *B<data> pointer (or any other pointers | 
| 58 | returned by these functions) with OPENSSL_free() as freeing is handled | 58 | returned by these functions) with free() as freeing is handled | 
| 59 | automatically by the error library. | 59 | automatically by the error library. | 
| 60 | 60 | ||
| 61 | =head1 RETURN VALUES | 61 | =head1 RETURN VALUES | 
| diff --git a/src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod b/src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod index 197878eff7..d22b900024 100644 --- a/src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod +++ b/src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod | |||
| @@ -67,7 +67,7 @@ Decrypt data using OAEP (for RSA keys): | |||
| 67 | if (EVP_PKEY_decrypt(ctx, NULL, &outlen, in, inlen) <= 0) | 67 | if (EVP_PKEY_decrypt(ctx, NULL, &outlen, in, inlen) <= 0) | 
| 68 | /* Error */ | 68 | /* Error */ | 
| 69 | 69 | ||
| 70 | out = OPENSSL_malloc(outlen); | 70 | out = malloc(outlen); | 
| 71 | 71 | ||
| 72 | if (!out) | 72 | if (!out) | 
| 73 | /* malloc failure */ | 73 | /* malloc failure */ | 
| diff --git a/src/lib/libcrypto/doc/EVP_PKEY_derive.pod b/src/lib/libcrypto/doc/EVP_PKEY_derive.pod index 2424ce0e54..09654e1b81 100644 --- a/src/lib/libcrypto/doc/EVP_PKEY_derive.pod +++ b/src/lib/libcrypto/doc/EVP_PKEY_derive.pod | |||
| @@ -68,7 +68,7 @@ Derive shared secret (for example DH or EC keys): | |||
| 68 | if (EVP_PKEY_derive(ctx, NULL, &skeylen) <= 0) | 68 | if (EVP_PKEY_derive(ctx, NULL, &skeylen) <= 0) | 
| 69 | /* Error */ | 69 | /* Error */ | 
| 70 | 70 | ||
| 71 | skey = OPENSSL_malloc(skeylen); | 71 | skey = malloc(skeylen); | 
| 72 | 72 | ||
| 73 | if (!skey) | 73 | if (!skey) | 
| 74 | /* malloc failure */ | 74 | /* malloc failure */ | 
| diff --git a/src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod b/src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod index f7969c296f..b0bfe5d5dc 100644 --- a/src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod +++ b/src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod | |||
| @@ -67,7 +67,7 @@ Encrypt data using OAEP (for RSA keys): | |||
| 67 | if (EVP_PKEY_encrypt(ctx, NULL, &outlen, in, inlen) <= 0) | 67 | if (EVP_PKEY_encrypt(ctx, NULL, &outlen, in, inlen) <= 0) | 
| 68 | /* Error */ | 68 | /* Error */ | 
| 69 | 69 | ||
| 70 | out = OPENSSL_malloc(outlen); | 70 | out = malloc(outlen); | 
| 71 | 71 | ||
| 72 | if (!out) | 72 | if (!out) | 
| 73 | /* malloc failure */ | 73 | /* malloc failure */ | 
| diff --git a/src/lib/libcrypto/doc/EVP_PKEY_sign.pod b/src/lib/libcrypto/doc/EVP_PKEY_sign.pod index fb8e61cf29..1925706d96 100644 --- a/src/lib/libcrypto/doc/EVP_PKEY_sign.pod +++ b/src/lib/libcrypto/doc/EVP_PKEY_sign.pod | |||
| @@ -69,7 +69,7 @@ Sign data using RSA with PKCS#1 padding and SHA256 digest: | |||
| 69 | if (EVP_PKEY_sign(ctx, NULL, &siglen, md, mdlen) <= 0) | 69 | if (EVP_PKEY_sign(ctx, NULL, &siglen, md, mdlen) <= 0) | 
| 70 | /* Error */ | 70 | /* Error */ | 
| 71 | 71 | ||
| 72 | sig = OPENSSL_malloc(siglen); | 72 | sig = malloc(siglen); | 
| 73 | 73 | ||
| 74 | if (!sig) | 74 | if (!sig) | 
| 75 | /* malloc failure */ | 75 | /* malloc failure */ | 
| diff --git a/src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod b/src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod index 4debf7bff0..095e53ea2f 100644 --- a/src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod +++ b/src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod | |||
| @@ -79,7 +79,7 @@ Recover digest originally signed using PKCS#1 and SHA256 digest: | |||
| 79 | if (EVP_PKEY_verify_recover(ctx, NULL, &routlen, sig, siglen) <= 0) | 79 | if (EVP_PKEY_verify_recover(ctx, NULL, &routlen, sig, siglen) <= 0) | 
| 80 | /* Error */ | 80 | /* Error */ | 
| 81 | 81 | ||
| 82 | rout = OPENSSL_malloc(routlen); | 82 | rout = malloc(routlen); | 
| 83 | 83 | ||
| 84 | if (!rout) | 84 | if (!rout) | 
| 85 | /* malloc failure */ | 85 | /* malloc failure */ | 
| diff --git a/src/lib/libcrypto/doc/d2i_X509.pod b/src/lib/libcrypto/doc/d2i_X509.pod index e212014ac8..fad4e8c35b 100644 --- a/src/lib/libcrypto/doc/d2i_X509.pod +++ b/src/lib/libcrypto/doc/d2i_X509.pod | |||
| @@ -91,7 +91,7 @@ Allocate and encode the DER encoding of an X509 structure: | |||
| 91 | 91 | ||
| 92 | len = i2d_X509(x, NULL); | 92 | len = i2d_X509(x, NULL); | 
| 93 | 93 | ||
| 94 | buf = OPENSSL_malloc(len); | 94 | buf = malloc(len); | 
| 95 | 95 | ||
| 96 | if (buf == NULL) | 96 | if (buf == NULL) | 
| 97 | /* error */ | 97 | /* error */ | 
| @@ -159,7 +159,7 @@ mistake is to attempt to use a buffer directly as follows: | |||
| 159 | 159 | ||
| 160 | len = i2d_X509(x, NULL); | 160 | len = i2d_X509(x, NULL); | 
| 161 | 161 | ||
| 162 | buf = OPENSSL_malloc(len); | 162 | buf = malloc(len); | 
| 163 | 163 | ||
| 164 | if (buf == NULL) | 164 | if (buf == NULL) | 
| 165 | /* error */ | 165 | /* error */ | 
| @@ -168,12 +168,12 @@ mistake is to attempt to use a buffer directly as follows: | |||
| 168 | 168 | ||
| 169 | /* Other stuff ... */ | 169 | /* Other stuff ... */ | 
| 170 | 170 | ||
| 171 | OPENSSL_free(buf); | 171 | free(buf); | 
| 172 | 172 | ||
| 173 | This code will result in B<buf> apparently containing garbage because | 173 | This code will result in B<buf> apparently containing garbage because | 
| 174 | it was incremented after the call to point after the data just written. | 174 | it was incremented after the call to point after the data just written. | 
| 175 | Also B<buf> will no longer contain the pointer allocated by B<OPENSSL_malloc()> | 175 | Also B<buf> will no longer contain the pointer allocated by B<malloc()> | 
| 176 | and the subsequent call to B<OPENSSL_free()> may well crash. | 176 | and the subsequent call to B<free()> may well crash. | 
| 177 | 177 | ||
| 178 | The auto allocation feature (setting buf to NULL) only works on OpenSSL | 178 | The auto allocation feature (setting buf to NULL) only works on OpenSSL | 
| 179 | 0.9.7 and later. Attempts to use it on earlier versions will typically | 179 | 0.9.7 and later. Attempts to use it on earlier versions will typically | 
