Add prediction resistance capability to the DRBG reseeding process.
[openssl.git] / doc / man3 / BIO_meth_new.pod
index 53a68a13e521e1780e825b190e4781de9c799903..9045d167779838c36604a4b1ee7c36539fdf79f7 100644 (file)
@@ -21,45 +21,45 @@ BIO_meth_set_callback_ctrl - Routines to build up BIO methods
 
  void BIO_meth_free(BIO_METHOD *biom);
 
- int (*BIO_meth_get_write_ex(BIO_METHOD *biom))(BIO *, const char *, size_t,
+ int (*BIO_meth_get_write_ex(const BIO_METHOD *biom))(BIO *, const char *, size_t,
                                                 size_t *);
- int (*BIO_meth_get_write(BIO_METHOD *biom))(BIO *, const char *, int);
+ int (*BIO_meth_get_write(const BIO_METHOD *biom))(BIO *, const char *, int);
  int BIO_meth_set_write_ex(BIO_METHOD *biom,
                            int (*bwrite)(BIO *, const char *, size_t, size_t *));
  int BIO_meth_set_write(BIO_METHOD *biom,
                         int (*write)(BIO *, const char *, int));
 
- int (*BIO_meth_get_read_ex(BIO_METHOD *biom))(BIO *, char *, size_t, size_t *);
- int (*BIO_meth_get_read(BIO_METHOD *biom))(BIO *, char *, int);
+ int (*BIO_meth_get_read_ex(const BIO_METHOD *biom))(BIO *, char *, size_t, size_t *);
+ int (*BIO_meth_get_read(const BIO_METHOD *biom))(BIO *, char *, int);
  int BIO_meth_set_read_ex(BIO_METHOD *biom,
                           int (*bread)(BIO *, char *, size_t, size_t *));
  int BIO_meth_set_read(BIO_METHOD *biom, int (*read)(BIO *, char *, int));
 
- int (*BIO_meth_get_puts(BIO_METHOD *biom))(BIO *, const char *);
+ int (*BIO_meth_get_puts(const BIO_METHOD *biom))(BIO *, const char *);
  int BIO_meth_set_puts(BIO_METHOD *biom, int (*puts)(BIO *, const char *));
 
- int (*BIO_meth_get_gets(BIO_METHOD *biom))(BIO *, char *, int);
+ int (*BIO_meth_get_gets(const BIO_METHOD *biom))(BIO *, char *, int);
  int BIO_meth_set_gets(BIO_METHOD *biom,
                        int (*gets)(BIO *, char *, int));
 
- long (*BIO_meth_get_ctrl(BIO_METHOD *biom))(BIO *, int, long, void *);
+ long (*BIO_meth_get_ctrl(const BIO_METHOD *biom))(BIO *, int, long, void *);
  int BIO_meth_set_ctrl(BIO_METHOD *biom,
                        long (*ctrl)(BIO *, int, long, void *));
 
- int (*BIO_meth_get_create(BIO_METHOD *bion))(BIO *);
+ int (*BIO_meth_get_create(const BIO_METHOD *bion))(BIO *);
  int BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *));
 
- int (*BIO_meth_get_destroy(BIO_METHOD *biom))(BIO *);
+ int (*BIO_meth_get_destroy(const BIO_METHOD *biom))(BIO *);
  int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy)(BIO *));
 
- long (*BIO_meth_get_callback_ctrl(BIO_METHOD *biom))(BIO *, int, bio_info_cb *);
+ long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom))(BIO *, int, BIO_info_cb *);
  int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
-                                long (*callback_ctrl)(BIO *, int, bio_info_cb *));
+                                long (*callback_ctrl)(BIO *, int, BIO_info_cb *));
 
 =head1 DESCRIPTION
 
 The B<BIO_METHOD> type is a structure used for the implementation of new BIO
-types. It provides a set of of functions used by OpenSSL for the implementation
+types. It provides a set of functions used by OpenSSL for the implementation
 of the various BIO capabilities. See the L<bio> page for more information.
 
 BIO_meth_new() creates a new B<BIO_METHOD> structure. It should be given a
@@ -133,19 +133,30 @@ the L<BIO_callback_ctrl(3)> page for more information. This function will be cal
 in response to the application calling BIO_callback_ctrl(). The parameters for
 the function have the same meaning as for BIO_callback_ctrl().
 
+=head1 RETURN VALUES
+
+BIO_get_new_index() returns the new BIO type value or -1 if an error occurred.
+
+BIO_meth_new(int type, const char *name) returns a valid B<BIO_METHOD> or NULL
+if an error occurred.
+
+The B<BIO_meth_set> functions return 1 on success or 0 on error.
+
+The B<BIO_meth_get> functions return the corresponding function pointers.
+
 =head1 SEE ALSO
 
 L<bio>, L<BIO_find_type>, L<BIO_ctrl>, L<BIO_read_ex>, L<BIO_new>
 
 =head1 HISTORY
 
-The functions described here were added in OpenSSL version 1.1.0.
+The functions described here were added in OpenSSL 1.1.0.
 
 =head1 COPYRIGHT
 
-Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
 
-Licensed under the OpenSSL license (the "License").  You may not use
+Licensed under the Apache License 2.0 (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<https://www.openssl.org/source/license.html>.