summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/doc/crypto
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-07-13 15:42:42 +0000
committermiod <miod@openbsd.org>2014-07-13 15:42:42 +0000
commit477c699cb315427fec51f7ccdf28a2448cb0b388 (patch)
tree39939e0077de7de882305c127ceb1fb3df33f7fd /lib/libssl/src/doc/crypto
parentWarn about the use of BUF_strdup. (diff)
downloadwireguard-openbsd-477c699cb315427fec51f7ccdf28a2448cb0b388.tar.xz
wireguard-openbsd-477c699cb315427fec51f7ccdf28a2448cb0b388.zip
OPENSSL_{malloc,free} -> {malloc,free}
Diffstat (limited to 'lib/libssl/src/doc/crypto')
-rw-r--r--lib/libssl/src/doc/crypto/ASN1_STRING_length.pod2
-rw-r--r--lib/libssl/src/doc/crypto/BN_bn2bin.pod2
-rw-r--r--lib/libssl/src/doc/crypto/EC_POINT_new.pod2
-rw-r--r--lib/libssl/src/doc/crypto/ERR_get_error.pod2
-rw-r--r--lib/libssl/src/doc/crypto/EVP_PKEY_decrypt.pod2
-rw-r--r--lib/libssl/src/doc/crypto/EVP_PKEY_derive.pod2
-rw-r--r--lib/libssl/src/doc/crypto/EVP_PKEY_encrypt.pod2
-rw-r--r--lib/libssl/src/doc/crypto/EVP_PKEY_sign.pod2
-rw-r--r--lib/libssl/src/doc/crypto/EVP_PKEY_verify_recover.pod2
-rw-r--r--lib/libssl/src/doc/crypto/d2i_X509.pod10
-rw-r--r--lib/libssl/src/doc/crypto/ecdsa.pod2
11 files changed, 15 insertions, 15 deletions
diff --git a/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod b/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod
index f651e4f2aee..f9a47a47dc0 100644
--- a/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod
+++ b/lib/libssl/src/doc/crypto/ASN1_STRING_length.pod
@@ -48,7 +48,7 @@ such as B<V_ASN1_OCTET_STRING>.
ASN1_STRING_to_UTF8() converts the string B<in> to UTF8 format, the
converted data is allocated in a buffer in B<*out>. The length of
B<out> is returned or a negative error code. The buffer B<*out>
-should be free using OPENSSL_free().
+should be free using free().
=head1 NOTES
diff --git a/lib/libssl/src/doc/crypto/BN_bn2bin.pod b/lib/libssl/src/doc/crypto/BN_bn2bin.pod
index a4b17ca60a8..03b439c7b94 100644
--- a/lib/libssl/src/doc/crypto/BN_bn2bin.pod
+++ b/lib/libssl/src/doc/crypto/BN_bn2bin.pod
@@ -36,7 +36,7 @@ NULL, a new B<BIGNUM> is created.
BN_bn2hex() and BN_bn2dec() return printable strings containing the
hexadecimal and decimal encoding of B<a> respectively. For negative
numbers, the string is prefaced with a leading '-'. The string must be
-freed later using OPENSSL_free().
+freed later using free().
BN_hex2bn() converts the string B<str> containing a hexadecimal number
to a B<BIGNUM> and stores it in **B<bn>. If *B<bn> is NULL, a new
diff --git a/lib/libssl/src/doc/crypto/EC_POINT_new.pod b/lib/libssl/src/doc/crypto/EC_POINT_new.pod
index 69eb0d1a09f..b41ca0ed0c8 100644
--- a/lib/libssl/src/doc/crypto/EC_POINT_new.pod
+++ b/lib/libssl/src/doc/crypto/EC_POINT_new.pod
@@ -91,7 +91,7 @@ The function EC_POINT_point2oct must be supplied with a buffer long enough to st
octets stored. Calling the function with a NULL buffer will not perform the conversion but will still return the required buffer length.
The function EC_POINT_point2hex will allocate sufficient memory to store the hexadecimal string. It is the caller's responsibility to free
-this memory with a subsequent call to OPENSSL_free().
+this memory with a subsequent call to free().
=head1 RETURN VALUES
diff --git a/lib/libssl/src/doc/crypto/ERR_get_error.pod b/lib/libssl/src/doc/crypto/ERR_get_error.pod
index 01e196c95fd..460a79f3f62 100644
--- a/lib/libssl/src/doc/crypto/ERR_get_error.pod
+++ b/lib/libssl/src/doc/crypto/ERR_get_error.pod
@@ -55,7 +55,7 @@ and *B<flags>, unless these are B<NULL>. *B<data> contains a string
if *B<flags>&B<ERR_TXT_STRING> is true.
An application B<MUST NOT> free the *B<data> pointer (or any other pointers
-returned by these functions) with OPENSSL_free() as freeing is handled
+returned by these functions) with free() as freeing is handled
automatically by the error library.
=head1 RETURN VALUES
diff --git a/lib/libssl/src/doc/crypto/EVP_PKEY_decrypt.pod b/lib/libssl/src/doc/crypto/EVP_PKEY_decrypt.pod
index 197878eff73..d22b900024e 100644
--- a/lib/libssl/src/doc/crypto/EVP_PKEY_decrypt.pod
+++ b/lib/libssl/src/doc/crypto/EVP_PKEY_decrypt.pod
@@ -67,7 +67,7 @@ Decrypt data using OAEP (for RSA keys):
if (EVP_PKEY_decrypt(ctx, NULL, &outlen, in, inlen) <= 0)
/* Error */
- out = OPENSSL_malloc(outlen);
+ out = malloc(outlen);
if (!out)
/* malloc failure */
diff --git a/lib/libssl/src/doc/crypto/EVP_PKEY_derive.pod b/lib/libssl/src/doc/crypto/EVP_PKEY_derive.pod
index 2424ce0e54c..09654e1b81d 100644
--- a/lib/libssl/src/doc/crypto/EVP_PKEY_derive.pod
+++ b/lib/libssl/src/doc/crypto/EVP_PKEY_derive.pod
@@ -68,7 +68,7 @@ Derive shared secret (for example DH or EC keys):
if (EVP_PKEY_derive(ctx, NULL, &skeylen) <= 0)
/* Error */
- skey = OPENSSL_malloc(skeylen);
+ skey = malloc(skeylen);
if (!skey)
/* malloc failure */
diff --git a/lib/libssl/src/doc/crypto/EVP_PKEY_encrypt.pod b/lib/libssl/src/doc/crypto/EVP_PKEY_encrypt.pod
index f7969c296ff..b0bfe5d5dc4 100644
--- a/lib/libssl/src/doc/crypto/EVP_PKEY_encrypt.pod
+++ b/lib/libssl/src/doc/crypto/EVP_PKEY_encrypt.pod
@@ -67,7 +67,7 @@ Encrypt data using OAEP (for RSA keys):
if (EVP_PKEY_encrypt(ctx, NULL, &outlen, in, inlen) <= 0)
/* Error */
- out = OPENSSL_malloc(outlen);
+ out = malloc(outlen);
if (!out)
/* malloc failure */
diff --git a/lib/libssl/src/doc/crypto/EVP_PKEY_sign.pod b/lib/libssl/src/doc/crypto/EVP_PKEY_sign.pod
index fb8e61cf299..1925706d96b 100644
--- a/lib/libssl/src/doc/crypto/EVP_PKEY_sign.pod
+++ b/lib/libssl/src/doc/crypto/EVP_PKEY_sign.pod
@@ -69,7 +69,7 @@ Sign data using RSA with PKCS#1 padding and SHA256 digest:
if (EVP_PKEY_sign(ctx, NULL, &siglen, md, mdlen) <= 0)
/* Error */
- sig = OPENSSL_malloc(siglen);
+ sig = malloc(siglen);
if (!sig)
/* malloc failure */
diff --git a/lib/libssl/src/doc/crypto/EVP_PKEY_verify_recover.pod b/lib/libssl/src/doc/crypto/EVP_PKEY_verify_recover.pod
index 4debf7bff04..095e53ea2f1 100644
--- a/lib/libssl/src/doc/crypto/EVP_PKEY_verify_recover.pod
+++ b/lib/libssl/src/doc/crypto/EVP_PKEY_verify_recover.pod
@@ -79,7 +79,7 @@ Recover digest originally signed using PKCS#1 and SHA256 digest:
if (EVP_PKEY_verify_recover(ctx, NULL, &routlen, sig, siglen) <= 0)
/* Error */
- rout = OPENSSL_malloc(routlen);
+ rout = malloc(routlen);
if (!rout)
/* malloc failure */
diff --git a/lib/libssl/src/doc/crypto/d2i_X509.pod b/lib/libssl/src/doc/crypto/d2i_X509.pod
index e212014ac8e..fad4e8c35ba 100644
--- a/lib/libssl/src/doc/crypto/d2i_X509.pod
+++ b/lib/libssl/src/doc/crypto/d2i_X509.pod
@@ -91,7 +91,7 @@ Allocate and encode the DER encoding of an X509 structure:
len = i2d_X509(x, NULL);
- buf = OPENSSL_malloc(len);
+ buf = malloc(len);
if (buf == NULL)
/* error */
@@ -159,7 +159,7 @@ mistake is to attempt to use a buffer directly as follows:
len = i2d_X509(x, NULL);
- buf = OPENSSL_malloc(len);
+ buf = malloc(len);
if (buf == NULL)
/* error */
@@ -168,12 +168,12 @@ mistake is to attempt to use a buffer directly as follows:
/* Other stuff ... */
- OPENSSL_free(buf);
+ free(buf);
This code will result in B<buf> apparently containing garbage because
it was incremented after the call to point after the data just written.
-Also B<buf> will no longer contain the pointer allocated by B<OPENSSL_malloc()>
-and the subsequent call to B<OPENSSL_free()> may well crash.
+Also B<buf> will no longer contain the pointer allocated by B<malloc()>
+and the subsequent call to B<free()> may well crash.
The auto allocation feature (setting buf to NULL) only works on OpenSSL
0.9.7 and later. Attempts to use it on earlier versions will typically
diff --git a/lib/libssl/src/doc/crypto/ecdsa.pod b/lib/libssl/src/doc/crypto/ecdsa.pod
index b981d865e42..9c8d633fc9c 100644
--- a/lib/libssl/src/doc/crypto/ecdsa.pod
+++ b/lib/libssl/src/doc/crypto/ecdsa.pod
@@ -155,7 +155,7 @@ or using B<ECDSA_sign>
int buf_len;
buf_len = ECDSA_size(eckey);
- buffer = OPENSSL_malloc(buf_len);
+ buffer = malloc(buf_len);
pp = buffer;
if (!ECDSA_sign(0, dgst, dgstlen, pp, &buf_len, eckey) {
/* error */