mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
OpenSSL: update build artifacts to match 3.0.16 release
The files committed match the output of the new vendor process. Much of this involves regenerating manpages to catch up to content from the initial 3.0 import. This is a direct commit to stable/14.
This commit is contained in:
parent
bf91efef66
commit
f19fe1bd86
806 changed files with 32345 additions and 90867 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* WARNING: do not edit!
|
||||
* Generated by apps/progs.pl
|
||||
*
|
||||
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -89,7 +89,6 @@ FUNCTION functions[] = {
|
|||
{FT_general, "s_time", s_time_main, s_time_options, NULL, NULL},
|
||||
#endif
|
||||
{FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL},
|
||||
{FT_general, "skeyutl", skeyutl_main, skeyutl_options, NULL, NULL},
|
||||
{FT_general, "smime", smime_main, smime_options, NULL, NULL},
|
||||
{FT_general, "speed", speed_main, speed_options, NULL, NULL},
|
||||
{FT_general, "spkac", spkac_main, spkac_options, NULL, NULL},
|
||||
|
|
@ -226,15 +225,9 @@ FUNCTION functions[] = {
|
|||
{FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL},
|
||||
#endif
|
||||
{FT_cipher, "base64", enc_main, enc_options, NULL},
|
||||
#ifndef OPENSSL_NO_ZLIB
|
||||
#ifdef ZLIB
|
||||
{FT_cipher, "zlib", enc_main, enc_options, NULL},
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_BROTLI
|
||||
{FT_cipher, "brotli", enc_main, enc_options, NULL},
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ZSTD
|
||||
{FT_cipher, "zstd", enc_main, enc_options, NULL},
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DES
|
||||
{FT_cipher, "des", enc_main, enc_options, NULL},
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* WARNING: do not edit!
|
||||
* Generated by apps/progs.pl
|
||||
*
|
||||
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -56,7 +56,6 @@ extern int s_client_main(int argc, char *argv[]);
|
|||
extern int s_server_main(int argc, char *argv[]);
|
||||
extern int s_time_main(int argc, char *argv[]);
|
||||
extern int sess_id_main(int argc, char *argv[]);
|
||||
extern int skeyutl_main(int argc, char *argv[]);
|
||||
extern int smime_main(int argc, char *argv[]);
|
||||
extern int speed_main(int argc, char *argv[]);
|
||||
extern int spkac_main(int argc, char *argv[]);
|
||||
|
|
@ -111,7 +110,6 @@ extern const OPTIONS s_client_options[];
|
|||
extern const OPTIONS s_server_options[];
|
||||
extern const OPTIONS s_time_options[];
|
||||
extern const OPTIONS sess_id_options[];
|
||||
extern const OPTIONS skeyutl_options[];
|
||||
extern const OPTIONS smime_options[];
|
||||
extern const OPTIONS speed_options[];
|
||||
extern const OPTIONS spkac_options[];
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
/* $FreeBSD$ */
|
||||
/* WARNING: do not edit! */
|
||||
/* Generated by Makefile from include/crypto/bn_conf.h.in */
|
||||
/*
|
||||
* Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2016-2021 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
|
||||
* https://www.openssl.org/source/license.html
|
||||
|
|
@ -12,6 +11,7 @@
|
|||
|
||||
#ifndef OSSL_CRYPTO_BN_CONF_H
|
||||
# define OSSL_CRYPTO_BN_CONF_H
|
||||
# pragma once
|
||||
|
||||
/*
|
||||
* The contents of this file are not used in the UEFI build, as
|
||||
|
|
@ -22,17 +22,9 @@
|
|||
/* Should we define BN_DIV2W here? */
|
||||
|
||||
/* Only one for the following should be defined */
|
||||
# if __SIZEOF_LONG__ == 8
|
||||
# define SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# undef THIRTY_TWO_BIT
|
||||
# elif __SIZEOF_LONG__ == 4
|
||||
# undef SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# define THIRTY_TWO_BIT
|
||||
# else
|
||||
# error Unsupported size of long
|
||||
# endif
|
||||
#define SIXTY_FOUR_BIT_LONG
|
||||
#undef SIXTY_FOUR_BIT
|
||||
#undef THIRTY_TWO_BIT
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* $FreeBSD$ */
|
||||
/* WARNING: do not edit! */
|
||||
/* Generated by Makefile from include/crypto/dso_conf.h.in */
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -867,7 +867,7 @@ int BIO_meth_set_puts(BIO_METHOD *biom,
|
|||
int (*puts) (BIO *, const char *));
|
||||
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));
|
||||
int (*ossl_gets) (BIO *, char *, int));
|
||||
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 *));
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ extern "C" {
|
|||
# ifndef OPENSSL_THREADS
|
||||
# define OPENSSL_THREADS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_ACVP_TESTS
|
||||
# define OPENSSL_NO_ACVP_TESTS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_AFALGENG
|
||||
# define OPENSSL_NO_AFALGENG
|
||||
# endif
|
||||
|
|
@ -49,17 +52,15 @@ extern "C" {
|
|||
# ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
||||
# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
||||
# endif
|
||||
# if !defined(__LP64__) || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
|
||||
# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
# define OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
# endif
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EGD
|
||||
# define OPENSSL_NO_EGD
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EXTERNAL_TESTS
|
||||
# define OPENSSL_NO_EXTERNAL_TESTS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_FIPS_SECURITYCHECKS
|
||||
# define OPENSSL_NO_FIPS_SECURITYCHECKS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_FUZZ_AFL
|
||||
# define OPENSSL_NO_FUZZ_AFL
|
||||
# endif
|
||||
|
|
@ -123,21 +124,11 @@ extern "C" {
|
|||
* The following are cipher-specific, but are part of the public API.
|
||||
*/
|
||||
# if !defined(OPENSSL_SYS_UEFI)
|
||||
# if __SIZEOF_LONG__ == 8
|
||||
# undef BN_LLONG
|
||||
# undef BN_LLONG
|
||||
/* Only one for the following should be defined */
|
||||
# define SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# undef THIRTY_TWO_BIT
|
||||
# elif __SIZEOF_LONG__ == 4
|
||||
# define BN_LLONG
|
||||
/* Only one for the following should be defined */
|
||||
# undef SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# define THIRTY_TWO_BIT
|
||||
# else
|
||||
# error Unsupported size of long
|
||||
# endif
|
||||
# define SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# undef THIRTY_TWO_BIT
|
||||
# endif
|
||||
|
||||
# define RC4_INT unsigned int
|
||||
|
|
@ -147,3 +138,41 @@ extern "C" {
|
|||
# endif
|
||||
|
||||
#endif /* OPENSSL_CONFIGURATION_H */
|
||||
|
||||
/**
|
||||
* OpenSSL's Configure script generates these values automatically for the host
|
||||
* architecture, but FreeBSD provides values which are universal for all
|
||||
* supported target architectures.
|
||||
*/
|
||||
|
||||
#ifndef __FREEBSD_CONFIGURATION_H__
|
||||
#define __FREEBSD_CONFIGURATION_H__
|
||||
|
||||
# undef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
# if __SIZEOF_LONG__ == 4 || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
|
||||
# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
# define OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# undef BN_LLONG
|
||||
# undef SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# undef THIRTY_TWO_BIT
|
||||
# if !defined(OPENSSL_SYS_UEFI)
|
||||
# if __SIZEOF_LONG__ == 8
|
||||
# undef BN_LLONG
|
||||
# define SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# undef THIRTY_TWO_BIT
|
||||
# elif __SIZEOF_LONG__ == 4
|
||||
# define BN_LLONG
|
||||
# undef SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# define THIRTY_TWO_BIT
|
||||
# else
|
||||
# error Unsupported size of long
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* __FREEBSD_CONFIGURATION_H__ */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* WARNING: do not edit!
|
||||
* Generated by Makefile from include/openssl/pkcs7.h.in
|
||||
*
|
||||
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -56,8 +56,8 @@ typedef struct pkcs7_signer_info_st {
|
|||
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
|
||||
X509_ALGOR *digest_alg;
|
||||
STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */
|
||||
X509_ALGOR *digest_enc_alg;
|
||||
ASN1_OCTET_STRING *enc_digest;
|
||||
X509_ALGOR *digest_enc_alg; /* confusing name, actually used for signing */
|
||||
ASN1_OCTET_STRING *enc_digest; /* confusing name, actually signature */
|
||||
STACK_OF(X509_ATTRIBUTE) *unauth_attr; /* [ 1 ] */
|
||||
/* The private key to sign with */
|
||||
EVP_PKEY *pkey;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
OPENSSL_VER= 3.5.1
|
||||
OPENSSL_DATE= 2025-07-01
|
||||
OPENSSL_VER= 3.0.16
|
||||
OPENSSL_DATE= 2025-02-11
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ADMISSIONS 3ossl"
|
||||
.TH ADMISSIONS 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ADMISSIONS 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ADMISSIONS,
|
||||
ADMISSIONS_get0_admissionAuthority,
|
||||
ADMISSIONS_get0_namingAuthority,
|
||||
|
|
@ -171,7 +96,7 @@ PROFESSION_INFO_set0_professionItems,
|
|||
PROFESSION_INFO_set0_professionOIDs,
|
||||
PROFESSION_INFO_set0_registrationNumber
|
||||
\&\- Accessors and settors for ADMISSION_SYNTAX
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 5
|
||||
\& typedef struct NamingAuthority_st NAMING_AUTHORITY;
|
||||
|
|
@ -230,23 +155,23 @@ PROFESSION_INFO_set0_registrationNumber
|
|||
\& void PROFESSION_INFO_set0_registrationNumber(
|
||||
\& PROFESSION_INFO *pi, ASN1_PRINTABLESTRING *rn);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fB\s-1PROFESSION_INFOS\s0\fR, \fB\s-1ADMISSION_SYNTAX\s0\fR, \fB\s-1ADMISSIONS\s0\fR, and
|
||||
\&\fB\s-1PROFESSION_INFO\s0\fR types are opaque structures representing the
|
||||
analogous types defined in the Common \s-1PKI\s0 Specification published
|
||||
The \fBPROFESSION_INFOS\fR, \fBADMISSION_SYNTAX\fR, \fBADMISSIONS\fR, and
|
||||
\&\fBPROFESSION_INFO\fR types are opaque structures representing the
|
||||
analogous types defined in the Common PKI Specification published
|
||||
by <https://www.t7ev.org>.
|
||||
Knowledge of those structures and their semantics is assumed.
|
||||
.PP
|
||||
The conventional routines to convert between \s-1DER\s0 and the local format
|
||||
The conventional routines to convert between DER and the local format
|
||||
are described in \fBd2i_X509\fR\|(3).
|
||||
The conventional routines to allocate and free the types are defined
|
||||
in \fBX509_dup\fR\|(3).
|
||||
.PP
|
||||
The \fB\s-1PROFESSION_INFOS\s0\fR type is a stack of \fB\s-1PROFESSION_INFO\s0\fR; see
|
||||
\&\s-1\fBDEFINE_STACK_OF\s0\fR\|(3) for details.
|
||||
The \fBPROFESSION_INFOS\fR type is a stack of \fBPROFESSION_INFO\fR; see
|
||||
\&\fBDEFINE_STACK_OF\fR\|(3) for details.
|
||||
.PP
|
||||
The \fB\s-1NAMING_AUTHORITY\s0\fR type has an authority \s-1ID\s0 and \s-1URL,\s0 and text fields.
|
||||
The \fBNAMING_AUTHORITY\fR type has an authority ID and URL, and text fields.
|
||||
The \fBNAMING_AUTHORITY_get0_authorityId()\fR,
|
||||
\&\fBNAMING_AUTHORITY_get0_get0_authorityURL()\fR, and
|
||||
\&\fBNAMING_AUTHORITY_get0_get0_authorityText()\fR, functions return pointers
|
||||
|
|
@ -256,8 +181,8 @@ The \fBNAMING_AUTHORITY_set0_authorityId()\fR,
|
|||
\&\fBNAMING_AUTHORITY_set0_get0_authorityText()\fR,
|
||||
functions free any existing value and set the pointer to the specified value.
|
||||
.PP
|
||||
The \fB\s-1ADMISSION_SYNTAX\s0\fR type has an authority name and a stack of
|
||||
\&\fB\s-1ADMISSION\s0\fR objects.
|
||||
The \fBADMISSION_SYNTAX\fR type has an authority name and a stack of
|
||||
\&\fBADMISSION\fR objects.
|
||||
The \fBADMISSION_SYNTAX_get0_admissionAuthority()\fR
|
||||
and \fBADMISSION_SYNTAX_get0_contentsOfAdmissions()\fR functions return pointers
|
||||
to those values within the object.
|
||||
|
|
@ -266,8 +191,8 @@ The
|
|||
\&\fBADMISSION_SYNTAX_set0_contentsOfAdmissions()\fR
|
||||
functions free any existing value and set the pointer to the specified value.
|
||||
.PP
|
||||
The \fB\s-1ADMISSION\s0\fR type has an authority name, authority object, and a
|
||||
stack of \fB\s-1PROFESSION_INFO\s0\fR items.
|
||||
The \fBADMISSION\fR type has an authority name, authority object, and a
|
||||
stack of \fBPROFESSION_INFO\fR items.
|
||||
The \fBADMISSIONS_get0_admissionAuthority()\fR, \fBADMISSIONS_get0_namingAuthority()\fR,
|
||||
and \fBADMISSIONS_get0_professionInfos()\fR
|
||||
functions return pointers to those values within the object.
|
||||
|
|
@ -277,7 +202,7 @@ The
|
|||
\&\fBADMISSIONS_set0_professionInfos()\fR
|
||||
functions free any existing value and set the pointer to the specified value.
|
||||
.PP
|
||||
The \fB\s-1PROFESSION_INFO\s0\fR type has a name authority, stacks of
|
||||
The \fBPROFESSION_INFO\fR type has a name authority, stacks of
|
||||
profession Items and OIDs, a registration number, and additional
|
||||
profession info.
|
||||
The functions \fBPROFESSION_INFO_get0_addProfessionInfo()\fR,
|
||||
|
|
@ -301,11 +226,11 @@ structure and must not be freed.
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBX509_dup\fR\|(3),
|
||||
\&\fBd2i_X509\fR\|(3),
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2017\-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_EXTERN_FUNCS 3ossl"
|
||||
.TH ASN1_EXTERN_FUNCS 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_EXTERN_FUNCS 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_EXTERN_FUNCS, ASN1_ex_d2i, ASN1_ex_d2i_ex, ASN1_ex_i2d, ASN1_ex_new_func,
|
||||
ASN1_ex_new_ex_func, ASN1_ex_free_func, ASN1_ex_print_func,
|
||||
IMPLEMENT_EXTERN_ASN1
|
||||
\&\- ASN.1 external function support
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1t.h>
|
||||
|
|
@ -180,120 +105,120 @@ IMPLEMENT_EXTERN_ASN1
|
|||
\&
|
||||
\& #define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs)
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\s-1ASN.1\s0 data structures templates are typically defined in OpenSSL using a series
|
||||
of macros such as \s-1\fBASN1_SEQUENCE\s0()\fR, \s-1\fBASN1_SEQUENCE_END\s0()\fR and so on. Instead
|
||||
ASN.1 data structures templates are typically defined in OpenSSL using a series
|
||||
of macros such as \fBASN1_SEQUENCE()\fR, \fBASN1_SEQUENCE_END()\fR and so on. Instead
|
||||
templates can also be defined based entirely on external functions. These
|
||||
external functions are called to perform operations such as creating a new
|
||||
\&\fB\s-1ASN1_VALUE\s0\fR or converting an \fB\s-1ASN1_VALUE\s0\fR to or from \s-1DER\s0 encoding.
|
||||
\&\fBASN1_VALUE\fR or converting an \fBASN1_VALUE\fR to or from DER encoding.
|
||||
.PP
|
||||
The macro \s-1\fBIMPLEMENT_EXTERN_ASN1\s0()\fR can be used to create such an externally
|
||||
The macro \fBIMPLEMENT_EXTERN_ASN1()\fR can be used to create such an externally
|
||||
defined structure. The name of the structure should be supplied in the \fIsname\fR
|
||||
parameter. The tag for the structure (e.g. typically \fBV_ASN1_SEQUENCE\fR) should
|
||||
be supplied in the \fItag\fR parameter. Finally a pointer to an
|
||||
\&\fB\s-1ASN1_EXTERN_FUNCS\s0\fR structure should be supplied in the \fIfptrs\fR parameter.
|
||||
\&\fBASN1_EXTERN_FUNCS\fR structure should be supplied in the \fIfptrs\fR parameter.
|
||||
.PP
|
||||
The \fB\s-1ASN1_EXTERN_FUNCS\s0\fR structure has the following entries.
|
||||
.IP "\fIapp_data\fR" 4
|
||||
The \fBASN1_EXTERN_FUNCS\fR structure has the following entries.
|
||||
.IP \fIapp_data\fR 4
|
||||
.IX Item "app_data"
|
||||
A pointer to arbitrary application specific data.
|
||||
.IP "\fIasn1_ex_new\fR" 4
|
||||
.IP \fIasn1_ex_new\fR 4
|
||||
.IX Item "asn1_ex_new"
|
||||
A \*(L"new\*(R" function responsible for constructing a new \fB\s-1ASN1_VALUE\s0\fR object. The
|
||||
A "new" function responsible for constructing a new \fBASN1_VALUE\fR object. The
|
||||
newly constructed value should be stored in \fI*pval\fR. The \fIit\fR parameter is a
|
||||
pointer to the \fB\s-1ASN1_ITEM\s0\fR template object created via the
|
||||
\&\s-1\fBIMPLEMENT_EXTERN_ASN1\s0()\fR macro.
|
||||
pointer to the \fBASN1_ITEM\fR template object created via the
|
||||
\&\fBIMPLEMENT_EXTERN_ASN1()\fR macro.
|
||||
.Sp
|
||||
Returns a positive value on success or 0 on error.
|
||||
.IP "\fIasn1_ex_free\fR" 4
|
||||
.IP \fIasn1_ex_free\fR 4
|
||||
.IX Item "asn1_ex_free"
|
||||
A \*(L"free\*(R" function responsible for freeing the \fB\s-1ASN1_VALUE\s0\fR passed in \fI*pval\fR
|
||||
that was previously allocated via a \*(L"new\*(R" function. The \fIit\fR parameter is a
|
||||
pointer to the \fB\s-1ASN1_ITEM\s0\fR template object created via the
|
||||
\&\s-1\fBIMPLEMENT_EXTERN_ASN1\s0()\fR macro.
|
||||
.IP "\fIasn1_ex_clear\fR" 4
|
||||
A "free" function responsible for freeing the \fBASN1_VALUE\fR passed in \fI*pval\fR
|
||||
that was previously allocated via a "new" function. The \fIit\fR parameter is a
|
||||
pointer to the \fBASN1_ITEM\fR template object created via the
|
||||
\&\fBIMPLEMENT_EXTERN_ASN1()\fR macro.
|
||||
.IP \fIasn1_ex_clear\fR 4
|
||||
.IX Item "asn1_ex_clear"
|
||||
A \*(L"clear\*(R" function responsible for clearing any data in the \fB\s-1ASN1_VALUE\s0\fR passed
|
||||
A "clear" function responsible for clearing any data in the \fBASN1_VALUE\fR passed
|
||||
in \fI*pval\fR and making it suitable for reuse. The \fIit\fR parameter is a pointer
|
||||
to the \fB\s-1ASN1_ITEM\s0\fR template object created via the \s-1\fBIMPLEMENT_EXTERN_ASN1\s0()\fR
|
||||
to the \fBASN1_ITEM\fR template object created via the \fBIMPLEMENT_EXTERN_ASN1()\fR
|
||||
macro.
|
||||
.IP "\fIasn1_ex_d2i\fR" 4
|
||||
.IP \fIasn1_ex_d2i\fR 4
|
||||
.IX Item "asn1_ex_d2i"
|
||||
A \*(L"d2i\*(R" function responsible for converting \s-1DER\s0 data with the tag \fItag\fR and
|
||||
class \fIclass\fR into an \fB\s-1ASN1_VALUE\s0\fR. If \fI*pval\fR is non-NULL then the
|
||||
\&\fB\s-1ASN_VALUE\s0\fR it points to should be reused. Otherwise a new \fB\s-1ASN1_VALUE\s0\fR
|
||||
should be allocated and stored in \fI*pval\fR. \fI*in\fR points to the \s-1DER\s0 data to be
|
||||
A "d2i" function responsible for converting DER data with the tag \fItag\fR and
|
||||
class \fIclass\fR into an \fBASN1_VALUE\fR. If \fI*pval\fR is non\-NULL then the
|
||||
\&\fBASN_VALUE\fR it points to should be reused. Otherwise a new \fBASN1_VALUE\fR
|
||||
should be allocated and stored in \fI*pval\fR. \fI*in\fR points to the DER data to be
|
||||
decoded and \fIlen\fR is the length of that data. After decoding \fI*in\fR should be
|
||||
updated to point at the next byte after the decoded data. If the \fB\s-1ASN1_VALUE\s0\fR
|
||||
updated to point at the next byte after the decoded data. If the \fBASN1_VALUE\fR
|
||||
is considered optional in this context then \fIopt\fR will be nonzero. Otherwise
|
||||
it will be zero. The \fIit\fR parameter is a pointer to the \fB\s-1ASN1_ITEM\s0\fR template
|
||||
object created via the \s-1\fBIMPLEMENT_EXTERN_ASN1\s0()\fR macro. A pointer to the current
|
||||
\&\fB\s-1ASN1_TLC\s0\fR context (which may be required for other \s-1ASN1\s0 function calls) is
|
||||
it will be zero. The \fIit\fR parameter is a pointer to the \fBASN1_ITEM\fR template
|
||||
object created via the \fBIMPLEMENT_EXTERN_ASN1()\fR macro. A pointer to the current
|
||||
\&\fBASN1_TLC\fR context (which may be required for other ASN1 function calls) is
|
||||
passed in the \fIctx\fR parameter.
|
||||
.Sp
|
||||
The \fIasn1_ex_d2i\fR entry may be \s-1NULL\s0 if \fIasn1_ex_d2i_ex\fR has been specified
|
||||
The \fIasn1_ex_d2i\fR entry may be NULL if \fIasn1_ex_d2i_ex\fR has been specified
|
||||
instead.
|
||||
.Sp
|
||||
Returns <= 0 on error or a positive value on success.
|
||||
.IP "\fIasn1_ex_i2d\fR" 4
|
||||
.IP \fIasn1_ex_i2d\fR 4
|
||||
.IX Item "asn1_ex_i2d"
|
||||
An \*(L"i2d\*(R" function responsible for converting an \fB\s-1ASN1_VALUE\s0\fR into \s-1DER\s0 encoding.
|
||||
On entry \fI*pval\fR will contain the \fB\s-1ASN1_VALUE\s0\fR to be encoded. If default
|
||||
An "i2d" function responsible for converting an \fBASN1_VALUE\fR into DER encoding.
|
||||
On entry \fI*pval\fR will contain the \fBASN1_VALUE\fR to be encoded. If default
|
||||
tagging is to be used then \fItag\fR will be \-1 on entry. Otherwise if implicit
|
||||
tagging should be used then \fItag\fR and \fIaclass\fR will be the tag and associated
|
||||
class.
|
||||
.Sp
|
||||
If \fIout\fR is not \s-1NULL\s0 then this function should write the \s-1DER\s0 encoded data to
|
||||
If \fIout\fR is not NULL then this function should write the DER encoded data to
|
||||
the buffer in \fI*out\fR, and then increment \fI*out\fR to point to immediately after
|
||||
the data just written.
|
||||
.Sp
|
||||
If \fIout\fR is \s-1NULL\s0 then no data should be written but the length calculated and
|
||||
If \fIout\fR is NULL then no data should be written but the length calculated and
|
||||
returned as if it were.
|
||||
.Sp
|
||||
The \fIasn1_ex_i2d\fR entry may be \s-1NULL\s0 if \fIasn1_ex_i2d_ex\fR has been specified
|
||||
The \fIasn1_ex_i2d\fR entry may be NULL if \fIasn1_ex_i2d_ex\fR has been specified
|
||||
instead.
|
||||
.Sp
|
||||
The return value should be negative if a fatal error occurred, or 0 if a
|
||||
non-fatal error occurred. Otherwise it should return the length of the encoded
|
||||
non\-fatal error occurred. Otherwise it should return the length of the encoded
|
||||
data.
|
||||
.IP "\fIasn1_ex_print\fR" 4
|
||||
.IP \fIasn1_ex_print\fR 4
|
||||
.IX Item "asn1_ex_print"
|
||||
A \*(L"print\*(R" function. \fIout\fR is the \s-1BIO\s0 to print the output to. \fI*pval\fR is the
|
||||
\&\fB\s-1ASN1_VALUE\s0\fR to be printed. \fIindent\fR is the number of spaces of indenting to
|
||||
A "print" function. \fIout\fR is the BIO to print the output to. \fI*pval\fR is the
|
||||
\&\fBASN1_VALUE\fR to be printed. \fIindent\fR is the number of spaces of indenting to
|
||||
be printed before any data is printed. \fIfname\fR is currently unused and is
|
||||
always "". \fIpctx\fR is a pointer to the \fB\s-1ASN1_PCTX\s0\fR for the print operation.
|
||||
always "". \fIpctx\fR is a pointer to the \fBASN1_PCTX\fR for the print operation.
|
||||
.Sp
|
||||
Returns 0 on error or a positive value on success. If the return value is 2 then
|
||||
an additional newline will be printed after the data printed by this function.
|
||||
.IP "\fIasn1_ex_new_ex\fR" 4
|
||||
.IP \fIasn1_ex_new_ex\fR 4
|
||||
.IX Item "asn1_ex_new_ex"
|
||||
This is the same as \fIasn1_ex_new\fR except that it is additionally passed the
|
||||
\&\s-1OSSL_LIB_CTX\s0 to be used in \fIlibctx\fR and any property query string to be used
|
||||
OSSL_LIB_CTX to be used in \fIlibctx\fR and any property query string to be used
|
||||
for algorithm fetching in the \fIpropq\fR parameter. See
|
||||
\&\*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in \fBcrypto\fR\|(7) for further details. If \fIasn1_ex_new_ex\fR is
|
||||
non \s-1NULL,\s0 then it will always be called in preference to \fIasn1_ex_new\fR.
|
||||
.IP "\fIasn1_ex_d2i_ex\fR" 4
|
||||
"ALGORITHM FETCHING" in \fBcrypto\fR\|(7) for further details. If \fIasn1_ex_new_ex\fR is
|
||||
non NULL, then it will always be called in preference to \fIasn1_ex_new\fR.
|
||||
.IP \fIasn1_ex_d2i_ex\fR 4
|
||||
.IX Item "asn1_ex_d2i_ex"
|
||||
This is the same as \fIasn1_ex_d2i\fR except that it is additionally passed the
|
||||
\&\s-1OSSL_LIB_CTX\s0 to be used in \fIlibctx\fR and any property query string to be used
|
||||
OSSL_LIB_CTX to be used in \fIlibctx\fR and any property query string to be used
|
||||
for algorithm fetching in the \fIpropq\fR parameter. See
|
||||
\&\*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in \fBcrypto\fR\|(7) for further details. If \fIasn1_ex_d2i_ex\fR is
|
||||
non \s-1NULL,\s0 then it will always be called in preference to \fIasn1_ex_d2i\fR.
|
||||
"ALGORITHM FETCHING" in \fBcrypto\fR\|(7) for further details. If \fIasn1_ex_d2i_ex\fR is
|
||||
non NULL, then it will always be called in preference to \fIasn1_ex_d2i\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
Return values for the various callbacks are as described above.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBASN1_item_new_ex\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fIasn1_ex_new_ex\fR and \fIasn1_ex_d2i_ex\fR callbacks were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_INTEGER_GET_INT64 3ossl"
|
||||
.TH ASN1_INTEGER_GET_INT64 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_INTEGER_GET_INT64 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_INTEGER_get_uint64, ASN1_INTEGER_set_uint64,
|
||||
ASN1_INTEGER_get_int64, ASN1_INTEGER_get, ASN1_INTEGER_set_int64, ASN1_INTEGER_set, BN_to_ASN1_INTEGER, ASN1_INTEGER_to_BN, ASN1_ENUMERATED_get_int64, ASN1_ENUMERATED_get, ASN1_ENUMERATED_set_int64, ASN1_ENUMERATED_set, BN_to_ASN1_ENUMERATED, ASN1_ENUMERATED_to_BN
|
||||
\&\- ASN.1 INTEGER and ENUMERATED utilities
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -168,12 +93,12 @@ ASN1_INTEGER_get_int64, ASN1_INTEGER_get, ASN1_INTEGER_set_int64, ASN1_INTEGER_s
|
|||
\& ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
|
||||
\& BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions convert to and from \fB\s-1ASN1_INTEGER\s0\fR and \fB\s-1ASN1_ENUMERATED\s0\fR
|
||||
These functions convert to and from \fBASN1_INTEGER\fR and \fBASN1_ENUMERATED\fR
|
||||
structures.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_get_int64()\fR converts an \fB\s-1ASN1_INTEGER\s0\fR into an \fBint64_t\fR type
|
||||
\&\fBASN1_INTEGER_get_int64()\fR converts an \fBASN1_INTEGER\fR into an \fBint64_t\fR type
|
||||
If successful it returns 1 and sets \fI*pr\fR to the value of \fIa\fR. If it fails
|
||||
(due to invalid type or the value being too big to fit into an \fBint64_t\fR type)
|
||||
it returns 0.
|
||||
|
|
@ -183,44 +108,44 @@ converts to a \fBuint64_t\fR type and an error is returned if the passed integer
|
|||
is negative.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_get()\fR also returns the value of \fIa\fR but it returns 0 if \fIa\fR is
|
||||
\&\s-1NULL\s0 and \-1 on error (which is ambiguous because \-1 is a legitimate value for
|
||||
an \fB\s-1ASN1_INTEGER\s0\fR). New applications should use \fBASN1_INTEGER_get_int64()\fR
|
||||
NULL and \-1 on error (which is ambiguous because \-1 is a legitimate value for
|
||||
an \fBASN1_INTEGER\fR). New applications should use \fBASN1_INTEGER_get_int64()\fR
|
||||
instead.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_set_int64()\fR sets the value of \fB\s-1ASN1_INTEGER\s0\fR \fIa\fR to the
|
||||
\&\fBASN1_INTEGER_set_int64()\fR sets the value of \fBASN1_INTEGER\fR \fIa\fR to the
|
||||
\&\fBint64_t\fR value \fIr\fR.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_set_uint64()\fR sets the value of \fB\s-1ASN1_INTEGER\s0\fR \fIa\fR to the
|
||||
\&\fBASN1_INTEGER_set_uint64()\fR sets the value of \fBASN1_INTEGER\fR \fIa\fR to the
|
||||
\&\fBuint64_t\fR value \fIr\fR.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_set()\fR sets the value of \fB\s-1ASN1_INTEGER\s0\fR \fIa\fR to the \fIlong\fR value
|
||||
\&\fBASN1_INTEGER_set()\fR sets the value of \fBASN1_INTEGER\fR \fIa\fR to the \fIlong\fR value
|
||||
\&\fIv\fR.
|
||||
.PP
|
||||
\&\fBBN_to_ASN1_INTEGER()\fR converts \fB\s-1BIGNUM\s0\fR \fIbn\fR to an \fB\s-1ASN1_INTEGER\s0\fR. If \fIai\fR
|
||||
is \s-1NULL\s0 a new \fB\s-1ASN1_INTEGER\s0\fR structure is returned. If \fIai\fR is not \s-1NULL\s0 then
|
||||
\&\fBBN_to_ASN1_INTEGER()\fR converts \fBBIGNUM\fR \fIbn\fR to an \fBASN1_INTEGER\fR. If \fIai\fR
|
||||
is NULL a new \fBASN1_INTEGER\fR structure is returned. If \fIai\fR is not NULL then
|
||||
the existing structure will be used instead.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_to_BN()\fR converts \s-1ASN1_INTEGER\s0 \fIai\fR into a \fB\s-1BIGNUM\s0\fR. If \fIbn\fR is
|
||||
\&\s-1NULL\s0 a new \fB\s-1BIGNUM\s0\fR structure is returned. If \fIbn\fR is not \s-1NULL\s0 then the
|
||||
\&\fBASN1_INTEGER_to_BN()\fR converts ASN1_INTEGER \fIai\fR into a \fBBIGNUM\fR. If \fIbn\fR is
|
||||
NULL a new \fBBIGNUM\fR structure is returned. If \fIbn\fR is not NULL then the
|
||||
existing structure will be used instead.
|
||||
.PP
|
||||
\&\fBASN1_ENUMERATED_get_int64()\fR, \fBASN1_ENUMERATED_set_int64()\fR,
|
||||
\&\fBASN1_ENUMERATED_set()\fR, \fBBN_to_ASN1_ENUMERATED()\fR and \fBASN1_ENUMERATED_to_BN()\fR
|
||||
behave in an identical way to their \s-1ASN1_INTEGER\s0 counterparts except they
|
||||
operate on an \fB\s-1ASN1_ENUMERATED\s0\fR value.
|
||||
behave in an identical way to their ASN1_INTEGER counterparts except they
|
||||
operate on an \fBASN1_ENUMERATED\fR value.
|
||||
.PP
|
||||
\&\fBASN1_ENUMERATED_get()\fR returns the value of \fIa\fR in a similar way to
|
||||
\&\fBASN1_INTEGER_get()\fR but it returns \fB0xffffffffL\fR if the value of \fIa\fR will not
|
||||
fit in a long type. New applications should use \fBASN1_ENUMERATED_get_int64()\fR
|
||||
instead.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
In general an \fB\s-1ASN1_INTEGER\s0\fR or \fB\s-1ASN1_ENUMERATED\s0\fR type can contain an
|
||||
In general an \fBASN1_INTEGER\fR or \fBASN1_ENUMERATED\fR type can contain an
|
||||
integer of almost arbitrary size and so cannot always be represented by a C
|
||||
\&\fBint64_t\fR type. However, in many cases (for example version numbers) they
|
||||
represent small integers which can be more easily manipulated if converted to
|
||||
an appropriate C integer type.
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
The ambiguous return values of \fBASN1_INTEGER_get()\fR and \fBASN1_ENUMERATED_get()\fR
|
||||
mean these functions should be avoided if possible. They are retained for
|
||||
|
|
@ -237,26 +162,26 @@ and 0 for failure. They will fail if the passed type is incorrect (this will
|
|||
only happen if there is a programming error) or if the value exceeds the range
|
||||
of an \fBint64_t\fR type.
|
||||
.PP
|
||||
\&\fBBN_to_ASN1_INTEGER()\fR and \fBBN_to_ASN1_ENUMERATED()\fR return an \fB\s-1ASN1_INTEGER\s0\fR or
|
||||
\&\fB\s-1ASN1_ENUMERATED\s0\fR structure respectively or \s-1NULL\s0 if an error occurs. They will
|
||||
\&\fBBN_to_ASN1_INTEGER()\fR and \fBBN_to_ASN1_ENUMERATED()\fR return an \fBASN1_INTEGER\fR or
|
||||
\&\fBASN1_ENUMERATED\fR structure respectively or NULL if an error occurs. They will
|
||||
only fail due to a memory allocation error.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_to_BN()\fR and \fBASN1_ENUMERATED_to_BN()\fR return a \fB\s-1BIGNUM\s0\fR structure
|
||||
of \s-1NULL\s0 if an error occurs. They can fail if the passed type is incorrect
|
||||
\&\fBASN1_INTEGER_to_BN()\fR and \fBASN1_ENUMERATED_to_BN()\fR return a \fBBIGNUM\fR structure
|
||||
of NULL if an error occurs. They can fail if the passed type is incorrect
|
||||
(due to programming error) or due to a memory allocation failure.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBASN1_INTEGER_set_int64()\fR, \fBASN1_INTEGER_get_int64()\fR,
|
||||
\&\fBASN1_ENUMERATED_set_int64()\fR and \fBASN1_ENUMERATED_get_int64()\fR
|
||||
were added in OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2015\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_INTEGER_NEW 3ossl"
|
||||
.TH ASN1_INTEGER_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_INTEGER_NEW 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_INTEGER_new, ASN1_INTEGER_free \- ASN1_INTEGER allocation functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -148,27 +73,28 @@ ASN1_INTEGER_new, ASN1_INTEGER_free \- ASN1_INTEGER allocation functions
|
|||
\& ASN1_INTEGER *ASN1_INTEGER_new(void);
|
||||
\& void ASN1_INTEGER_free(ASN1_INTEGER *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBASN1_INTEGER_new()\fR returns an allocated \fB\s-1ASN1_INTEGER\s0\fR structure.
|
||||
\&\fBASN1_INTEGER_new()\fR returns an allocated \fBASN1_INTEGER\fR structure.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_free()\fR frees up a single \fB\s-1ASN1_INTEGER\s0\fR object.
|
||||
\&\fBASN1_INTEGER_free()\fR frees up a single \fBASN1_INTEGER\fR object.
|
||||
If the argument is NULL, nothing is done.
|
||||
.PP
|
||||
\&\fB\s-1ASN1_INTEGER\s0\fR structure representing the \s-1ASN.1 INTEGER\s0 type
|
||||
\&\fBASN1_INTEGER\fR structure representing the ASN.1 INTEGER type
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_INTEGER_new()\fR return a valid \fB\s-1ASN1_INTEGER\s0\fR structure or \s-1NULL\s0
|
||||
\&\fBASN1_INTEGER_new()\fR return a valid \fBASN1_INTEGER\fR structure or NULL
|
||||
if an error occurred.
|
||||
.PP
|
||||
\&\fBASN1_INTEGER_free()\fR does not return a value.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2020\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_ITEM_LOOKUP 3ossl"
|
||||
.TH ASN1_ITEM_LOOKUP 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_ITEM_LOOKUP 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_ITEM_lookup, ASN1_ITEM_get \- lookup ASN.1 structures
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -148,24 +73,24 @@ ASN1_ITEM_lookup, ASN1_ITEM_get \- lookup ASN.1 structures
|
|||
\& const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
|
||||
\& const ASN1_ITEM *ASN1_ITEM_get(size_t i);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBASN1_ITEM_lookup()\fR returns the \fB\s-1ASN1_ITEM\s0\fR named \fIname\fR.
|
||||
\&\fBASN1_ITEM_lookup()\fR returns the \fBASN1_ITEM\fR named \fIname\fR.
|
||||
.PP
|
||||
\&\fBASN1_ITEM_get()\fR returns the \fB\s-1ASN1_ITEM\s0\fR with index \fIi\fR. This function
|
||||
returns \s-1NULL\s0 if the index \fIi\fR is out of range.
|
||||
\&\fBASN1_ITEM_get()\fR returns the \fBASN1_ITEM\fR with index \fIi\fR. This function
|
||||
returns NULL if the index \fIi\fR is out of range.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_ITEM_lookup()\fR and \fBASN1_ITEM_get()\fR return a valid \fB\s-1ASN1_ITEM\s0\fR structure
|
||||
or \s-1NULL\s0 if an error occurred.
|
||||
\&\fBASN1_ITEM_lookup()\fR and \fBASN1_ITEM_get()\fR return a valid \fBASN1_ITEM\fR structure
|
||||
or NULL if an error occurred.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_OBJECT_NEW 3ossl"
|
||||
.TH ASN1_OBJECT_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_OBJECT_NEW 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_OBJECT_new, ASN1_OBJECT_free \- object allocation functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -148,23 +73,23 @@ ASN1_OBJECT_new, ASN1_OBJECT_free \- object allocation functions
|
|||
\& ASN1_OBJECT *ASN1_OBJECT_new(void);
|
||||
\& void ASN1_OBJECT_free(ASN1_OBJECT *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fB\s-1ASN1_OBJECT\s0\fR allocation routines, allocate and free an
|
||||
\&\fB\s-1ASN1_OBJECT\s0\fR structure, which represents an \s-1ASN1 OBJECT IDENTIFIER.\s0
|
||||
The \fBASN1_OBJECT\fR allocation routines, allocate and free an
|
||||
\&\fBASN1_OBJECT\fR structure, which represents an ASN1 OBJECT IDENTIFIER.
|
||||
.PP
|
||||
\&\fBASN1_OBJECT_new()\fR allocates and initializes an \fB\s-1ASN1_OBJECT\s0\fR structure.
|
||||
\&\fBASN1_OBJECT_new()\fR allocates and initializes an \fBASN1_OBJECT\fR structure.
|
||||
.PP
|
||||
\&\fBASN1_OBJECT_free()\fR frees up the \fB\s-1ASN1_OBJECT\s0\fR structure \fIa\fR.
|
||||
If \fIa\fR is \s-1NULL,\s0 nothing is done.
|
||||
.SH "NOTES"
|
||||
\&\fBASN1_OBJECT_free()\fR frees up the \fBASN1_OBJECT\fR structure \fIa\fR.
|
||||
If \fIa\fR is NULL, nothing is done.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Although \fBASN1_OBJECT_new()\fR allocates a new \fB\s-1ASN1_OBJECT\s0\fR structure it
|
||||
is almost never used in applications. The \s-1ASN1\s0 object utility functions
|
||||
Although \fBASN1_OBJECT_new()\fR allocates a new \fBASN1_OBJECT\fR structure it
|
||||
is almost never used in applications. The ASN1 object utility functions
|
||||
such as \fBOBJ_nid2obj()\fR are used instead.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
If the allocation fails, \fBASN1_OBJECT_new()\fR returns \s-1NULL\s0 and sets an error
|
||||
If the allocation fails, \fBASN1_OBJECT_new()\fR returns NULL and sets an error
|
||||
code that can be obtained by \fBERR_get_error\fR\|(3).
|
||||
Otherwise it returns a pointer to the newly allocated structure.
|
||||
.PP
|
||||
|
|
@ -172,11 +97,11 @@ Otherwise it returns a pointer to the newly allocated structure.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBd2i_ASN1_OBJECT\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2002\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_STRING_TABLE_ADD 3ossl"
|
||||
.TH ASN1_STRING_TABLE_ADD 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_STRING_TABLE_ADD 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_STRING_TABLE, ASN1_STRING_TABLE_add, ASN1_STRING_TABLE_get,
|
||||
ASN1_STRING_TABLE_cleanup \- ASN1_STRING_TABLE manipulation functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -153,44 +78,44 @@ ASN1_STRING_TABLE_cleanup \- ASN1_STRING_TABLE manipulation functions
|
|||
\& ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
|
||||
\& void ASN1_STRING_TABLE_cleanup(void);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
.SS "Types"
|
||||
.SS Types
|
||||
.IX Subsection "Types"
|
||||
\&\fB\s-1ASN1_STRING_TABLE\s0\fR is a table which holds string information
|
||||
(basically minimum size, maximum size, type and etc) for a \s-1NID\s0 object.
|
||||
.SS "Functions"
|
||||
\&\fBASN1_STRING_TABLE\fR is a table which holds string information
|
||||
(basically minimum size, maximum size, type and etc) for a NID object.
|
||||
.SS Functions
|
||||
.IX Subsection "Functions"
|
||||
\&\fBASN1_STRING_TABLE_add()\fR adds a new \fB\s-1ASN1_STRING_TABLE\s0\fR item into the
|
||||
local \s-1ASN1\s0 string table based on the \fInid\fR along with other parameters.
|
||||
\&\fBASN1_STRING_TABLE_add()\fR adds a new \fBASN1_STRING_TABLE\fR item into the
|
||||
local ASN1 string table based on the \fInid\fR along with other parameters.
|
||||
.PP
|
||||
If the item is already in the table, fields of \fB\s-1ASN1_STRING_TABLE\s0\fR are
|
||||
If the item is already in the table, fields of \fBASN1_STRING_TABLE\fR are
|
||||
updated (depending on the values of those parameters, e.g., \fIminsize\fR
|
||||
and \fImaxsize\fR >= 0, \fImask\fR and \fIflags\fR != 0). If the \fInid\fR is standard,
|
||||
a copy of the standard \fB\s-1ASN1_STRING_TABLE\s0\fR is created and updated with
|
||||
a copy of the standard \fBASN1_STRING_TABLE\fR is created and updated with
|
||||
other parameters.
|
||||
.PP
|
||||
\&\fBASN1_STRING_TABLE_get()\fR searches for an \fB\s-1ASN1_STRING_TABLE\s0\fR item based
|
||||
\&\fBASN1_STRING_TABLE_get()\fR searches for an \fBASN1_STRING_TABLE\fR item based
|
||||
on \fInid\fR. It will search the local table first, then the standard one.
|
||||
.PP
|
||||
\&\fBASN1_STRING_TABLE_cleanup()\fR frees all \fB\s-1ASN1_STRING_TABLE\s0\fR items added
|
||||
\&\fBASN1_STRING_TABLE_cleanup()\fR frees all \fBASN1_STRING_TABLE\fR items added
|
||||
by \fBASN1_STRING_TABLE_add()\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_STRING_TABLE_add()\fR returns 1 on success, 0 if an error occurred.
|
||||
.PP
|
||||
\&\fBASN1_STRING_TABLE_get()\fR returns a valid \fB\s-1ASN1_STRING_TABLE\s0\fR structure
|
||||
or \s-1NULL\s0 if nothing is found.
|
||||
\&\fBASN1_STRING_TABLE_get()\fR returns a valid \fBASN1_STRING_TABLE\fR structure
|
||||
or NULL if nothing is found.
|
||||
.PP
|
||||
\&\fBASN1_STRING_TABLE_cleanup()\fR does not return a value.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2017\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_STRING_LENGTH 3ossl"
|
||||
.TH ASN1_STRING_LENGTH 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_STRING_LENGTH 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_STRING_dup, ASN1_STRING_cmp, ASN1_STRING_set, ASN1_STRING_length,
|
||||
ASN1_STRING_type, ASN1_STRING_get0_data, ASN1_STRING_data,
|
||||
ASN1_STRING_to_UTF8 \- ASN1_STRING utility functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -161,9 +86,9 @@ ASN1_STRING_to_UTF8 \- ASN1_STRING utility functions
|
|||
\&
|
||||
\& int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions allow an \fB\s-1ASN1_STRING\s0\fR structure to be manipulated.
|
||||
These functions allow an \fBASN1_STRING\fR structure to be manipulated.
|
||||
.PP
|
||||
\&\fBASN1_STRING_length()\fR returns the length of the content of \fIx\fR.
|
||||
.PP
|
||||
|
|
@ -187,28 +112,28 @@ is \-1 then the length is determined by strlen(data).
|
|||
\&\fBASN1_STRING_type()\fR returns the type of \fIx\fR, using standard constants
|
||||
such as \fBV_ASN1_OCTET_STRING\fR.
|
||||
.PP
|
||||
\&\fBASN1_STRING_to_UTF8()\fR converts the string \fIin\fR to \s-1UTF8\s0 format, the
|
||||
\&\fBASN1_STRING_to_UTF8()\fR converts the string \fIin\fR to UTF8 format, the
|
||||
converted data is allocated in a buffer in \fI*out\fR. The length of
|
||||
\&\fIout\fR is returned or a negative error code. The buffer \fI*out\fR
|
||||
should be freed using \fBOPENSSL_free()\fR.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Almost all \s-1ASN1\s0 types in OpenSSL are represented as an \fB\s-1ASN1_STRING\s0\fR
|
||||
structure. Other types such as \fB\s-1ASN1_OCTET_STRING\s0\fR are simply typedef'ed
|
||||
to \fB\s-1ASN1_STRING\s0\fR and the functions call the \fB\s-1ASN1_STRING\s0\fR equivalents.
|
||||
\&\fB\s-1ASN1_STRING\s0\fR is also used for some \fB\s-1CHOICE\s0\fR types which consist
|
||||
Almost all ASN1 types in OpenSSL are represented as an \fBASN1_STRING\fR
|
||||
structure. Other types such as \fBASN1_OCTET_STRING\fR are simply typedef\*(Aqed
|
||||
to \fBASN1_STRING\fR and the functions call the \fBASN1_STRING\fR equivalents.
|
||||
\&\fBASN1_STRING\fR is also used for some \fBCHOICE\fR types which consist
|
||||
entirely of primitive string types such as \fBDirectoryString\fR and
|
||||
\&\fBTime\fR.
|
||||
.PP
|
||||
These functions should \fBnot\fR be used to examine or modify \fB\s-1ASN1_INTEGER\s0\fR
|
||||
or \fB\s-1ASN1_ENUMERATED\s0\fR types: the relevant \fB\s-1INTEGER\s0\fR or \fB\s-1ENUMERATED\s0\fR
|
||||
These functions should \fBnot\fR be used to examine or modify \fBASN1_INTEGER\fR
|
||||
or \fBASN1_ENUMERATED\fR types: the relevant \fBINTEGER\fR or \fBENUMERATED\fR
|
||||
utility functions should be used instead.
|
||||
.PP
|
||||
In general it cannot be assumed that the data returned by \fBASN1_STRING_data()\fR
|
||||
is null terminated or does not contain embedded nulls. The actual format
|
||||
of the data will depend on the actual string type itself: for example
|
||||
for an IA5String the data will be \s-1ASCII,\s0 for a BMPString two bytes per
|
||||
character in big endian format, and for a UTF8String it will be in \s-1UTF8\s0 format.
|
||||
for an IA5String the data will be ASCII, for a BMPString two bytes per
|
||||
character in big endian format, and for a UTF8String it will be in UTF8 format.
|
||||
.PP
|
||||
Similar care should be take to ensure the data is in the correct format
|
||||
when calling \fBASN1_STRING_set()\fR.
|
||||
|
|
@ -219,7 +144,7 @@ when calling \fBASN1_STRING_set()\fR.
|
|||
\&\fBASN1_STRING_get0_data()\fR and \fBASN1_STRING_data()\fR return an internal pointer to
|
||||
the data of \fIx\fR.
|
||||
.PP
|
||||
\&\fBASN1_STRING_dup()\fR returns a valid \fB\s-1ASN1_STRING\s0\fR structure or \s-1NULL\s0 if an
|
||||
\&\fBASN1_STRING_dup()\fR returns a valid \fBASN1_STRING\fR structure or NULL if an
|
||||
error occurred.
|
||||
.PP
|
||||
\&\fBASN1_STRING_cmp()\fR returns an integer greater than, equal to, or less than 0,
|
||||
|
|
@ -234,11 +159,11 @@ negative value if an error occurred.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2002\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_STRING_NEW 3ossl"
|
||||
.TH ASN1_STRING_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_STRING_NEW 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_STRING_new, ASN1_STRING_type_new, ASN1_STRING_free \-
|
||||
ASN1_STRING allocation functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -150,34 +75,34 @@ ASN1_STRING allocation functions
|
|||
\& ASN1_STRING *ASN1_STRING_type_new(int type);
|
||||
\& void ASN1_STRING_free(ASN1_STRING *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBASN1_STRING_new()\fR returns an allocated \fB\s-1ASN1_STRING\s0\fR structure. Its type
|
||||
\&\fBASN1_STRING_new()\fR returns an allocated \fBASN1_STRING\fR structure. Its type
|
||||
is undefined.
|
||||
.PP
|
||||
\&\fBASN1_STRING_type_new()\fR returns an allocated \fB\s-1ASN1_STRING\s0\fR structure of
|
||||
\&\fBASN1_STRING_type_new()\fR returns an allocated \fBASN1_STRING\fR structure of
|
||||
type \fItype\fR.
|
||||
.PP
|
||||
\&\fBASN1_STRING_free()\fR frees up \fIa\fR.
|
||||
If \fIa\fR is \s-1NULL\s0 nothing is done.
|
||||
.SH "NOTES"
|
||||
If \fIa\fR is NULL nothing is done.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Other string types call the \fB\s-1ASN1_STRING\s0\fR functions. For example
|
||||
Other string types call the \fBASN1_STRING\fR functions. For example
|
||||
\&\fBASN1_OCTET_STRING_new()\fR calls ASN1_STRING_type_new(V_ASN1_OCTET_STRING).
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_STRING_new()\fR and \fBASN1_STRING_type_new()\fR return a valid
|
||||
\&\fB\s-1ASN1_STRING\s0\fR structure or \s-1NULL\s0 if an error occurred.
|
||||
\&\fBASN1_STRING\fR structure or NULL if an error occurred.
|
||||
.PP
|
||||
\&\fBASN1_STRING_free()\fR does not return a value.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2002\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_STRING_PRINT_EX 3ossl"
|
||||
.TH ASN1_STRING_PRINT_EX 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_STRING_PRINT_EX 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_tag2str, ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp, ASN1_STRING_print
|
||||
\&\- ASN1_STRING output routines
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -152,78 +77,78 @@ ASN1_tag2str, ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp, ASN1_STRING_print
|
|||
\&
|
||||
\& const char *ASN1_tag2str(int tag);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions output an \fB\s-1ASN1_STRING\s0\fR structure. \fB\s-1ASN1_STRING\s0\fR is used to
|
||||
represent all the \s-1ASN1\s0 string types.
|
||||
These functions output an \fBASN1_STRING\fR structure. \fBASN1_STRING\fR is used to
|
||||
represent all the ASN1 string types.
|
||||
.PP
|
||||
\&\fBASN1_STRING_print_ex()\fR outputs \fIstr\fR to \fIout\fR, the format is determined by
|
||||
the options \fIflags\fR. \fBASN1_STRING_print_ex_fp()\fR is identical except it outputs
|
||||
to \fIfp\fR instead.
|
||||
.PP
|
||||
\&\fBASN1_STRING_print()\fR prints \fIstr\fR to \fIout\fR but using a different format to
|
||||
\&\fBASN1_STRING_print_ex()\fR. It replaces unprintable characters (other than \s-1CR, LF\s0)
|
||||
with '.'.
|
||||
\&\fBASN1_STRING_print_ex()\fR. It replaces unprintable characters (other than CR, LF)
|
||||
with \*(Aq.\*(Aq.
|
||||
.PP
|
||||
\&\fBASN1_tag2str()\fR returns a human-readable name of the specified \s-1ASN.1\s0 \fItag\fR.
|
||||
.SH "NOTES"
|
||||
\&\fBASN1_tag2str()\fR returns a human\-readable name of the specified ASN.1 \fItag\fR.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
\&\fBASN1_STRING_print()\fR is a deprecated function which should be avoided; use
|
||||
\&\fBASN1_STRING_print_ex()\fR instead.
|
||||
.PP
|
||||
Although there are a large number of options frequently \fB\s-1ASN1_STRFLGS_RFC2253\s0\fR is
|
||||
suitable, or on \s-1UTF8\s0 terminals \fB\s-1ASN1_STRFLGS_RFC2253 &\s0 ~ASN1_STRFLGS_ESC_MSB\fR.
|
||||
Although there are a large number of options frequently \fBASN1_STRFLGS_RFC2253\fR is
|
||||
suitable, or on UTF8 terminals \fBASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB\fR.
|
||||
.PP
|
||||
The complete set of supported options for \fIflags\fR is listed below.
|
||||
.PP
|
||||
Various characters can be escaped. If \fB\s-1ASN1_STRFLGS_ESC_2253\s0\fR is set the characters
|
||||
determined by \s-1RFC2253\s0 are escaped. If \fB\s-1ASN1_STRFLGS_ESC_CTRL\s0\fR is set control
|
||||
characters are escaped. If \fB\s-1ASN1_STRFLGS_ESC_MSB\s0\fR is set characters with the
|
||||
\&\s-1MSB\s0 set are escaped: this option should \fBnot\fR be used if the terminal correctly
|
||||
interprets \s-1UTF8\s0 sequences.
|
||||
Various characters can be escaped. If \fBASN1_STRFLGS_ESC_2253\fR is set the characters
|
||||
determined by RFC2253 are escaped. If \fBASN1_STRFLGS_ESC_CTRL\fR is set control
|
||||
characters are escaped. If \fBASN1_STRFLGS_ESC_MSB\fR is set characters with the
|
||||
MSB set are escaped: this option should \fBnot\fR be used if the terminal correctly
|
||||
interprets UTF8 sequences.
|
||||
.PP
|
||||
Escaping takes several forms.
|
||||
.PP
|
||||
If the character being escaped is a 16 bit character then the form \*(L"\eUXXXX\*(R" is used
|
||||
If the character being escaped is a 16 bit character then the form "\eUXXXX" is used
|
||||
using exactly four characters for the hex representation. If it is 32 bits then
|
||||
\&\*(L"\eWXXXXXXXX\*(R" is used using eight characters of its hex representation. These forms
|
||||
will only be used if \s-1UTF8\s0 conversion is not set (see below).
|
||||
"\eWXXXXXXXX" is used using eight characters of its hex representation. These forms
|
||||
will only be used if UTF8 conversion is not set (see below).
|
||||
.PP
|
||||
Printable characters are normally escaped using the backslash '\e' character. If
|
||||
\&\fB\s-1ASN1_STRFLGS_ESC_QUOTE\s0\fR is set then the whole string is instead surrounded by
|
||||
Printable characters are normally escaped using the backslash \*(Aq\e\*(Aq character. If
|
||||
\&\fBASN1_STRFLGS_ESC_QUOTE\fR is set then the whole string is instead surrounded by
|
||||
double quote characters: this is arguably more readable than the backslash
|
||||
notation. Other characters use the \*(L"\eXX\*(R" using exactly two characters of the hex
|
||||
notation. Other characters use the "\eXX" using exactly two characters of the hex
|
||||
representation.
|
||||
.PP
|
||||
If \fB\s-1ASN1_STRFLGS_UTF8_CONVERT\s0\fR is set then characters are converted to \s-1UTF8\s0
|
||||
format first. If the terminal supports the display of \s-1UTF8\s0 sequences then this
|
||||
If \fBASN1_STRFLGS_UTF8_CONVERT\fR is set then characters are converted to UTF8
|
||||
format first. If the terminal supports the display of UTF8 sequences then this
|
||||
option will correctly display multi byte characters.
|
||||
.PP
|
||||
If \fB\s-1ASN1_STRFLGS_IGNORE_TYPE\s0\fR is set then the string type is not interpreted at
|
||||
If \fBASN1_STRFLGS_IGNORE_TYPE\fR is set then the string type is not interpreted at
|
||||
all: everything is assumed to be one byte per character. This is primarily for
|
||||
debugging purposes and can result in confusing output in multi character strings.
|
||||
.PP
|
||||
If \fB\s-1ASN1_STRFLGS_SHOW_TYPE\s0\fR is set then the string type itself is printed out
|
||||
before its value (for example \*(L"\s-1BMPSTRING\*(R"\s0), this actually uses \fBASN1_tag2str()\fR.
|
||||
If \fBASN1_STRFLGS_SHOW_TYPE\fR is set then the string type itself is printed out
|
||||
before its value (for example "BMPSTRING"), this actually uses \fBASN1_tag2str()\fR.
|
||||
.PP
|
||||
The content of a string instead of being interpreted can be \*(L"dumped\*(R": this just
|
||||
The content of a string instead of being interpreted can be "dumped": this just
|
||||
outputs the value of the string using the form #XXXX using hex format for each
|
||||
octet.
|
||||
.PP
|
||||
If \fB\s-1ASN1_STRFLGS_DUMP_ALL\s0\fR is set then any type is dumped.
|
||||
If \fBASN1_STRFLGS_DUMP_ALL\fR is set then any type is dumped.
|
||||
.PP
|
||||
Normally non character string types (such as \s-1OCTET STRING\s0) are assumed to be
|
||||
one byte per character, if \fB\s-1ASN1_STRFLGS_DUMP_UNKNOWN\s0\fR is set then they will
|
||||
Normally non character string types (such as OCTET STRING) are assumed to be
|
||||
one byte per character, if \fBASN1_STRFLGS_DUMP_UNKNOWN\fR is set then they will
|
||||
be dumped instead.
|
||||
.PP
|
||||
When a type is dumped normally just the content octets are printed, if
|
||||
\&\fB\s-1ASN1_STRFLGS_DUMP_DER\s0\fR is set then the complete encoding is dumped
|
||||
\&\fBASN1_STRFLGS_DUMP_DER\fR is set then the complete encoding is dumped
|
||||
instead (including tag and length octets).
|
||||
.PP
|
||||
\&\fB\s-1ASN1_STRFLGS_RFC2253\s0\fR includes all the flags required by \s-1RFC2253.\s0 It is
|
||||
\&\fBASN1_STRFLGS_RFC2253\fR includes all the flags required by RFC2253. It is
|
||||
equivalent to:
|
||||
\s-1ASN1_STRFLGS_ESC_2253\s0 | \s-1ASN1_STRFLGS_ESC_CTRL\s0 | \s-1ASN1_STRFLGS_ESC_MSB\s0 |
|
||||
\s-1ASN1_STRFLGS_UTF8_CONVERT\s0 | \s-1ASN1_STRFLGS_DUMP_UNKNOWN ASN1_STRFLGS_DUMP_DER\s0
|
||||
ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB |
|
||||
ASN1_STRFLGS_UTF8_CONVERT | ASN1_STRFLGS_DUMP_UNKNOWN ASN1_STRFLGS_DUMP_DER
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_STRING_print_ex()\fR and \fBASN1_STRING_print_ex_fp()\fR return the number of
|
||||
|
|
@ -231,16 +156,16 @@ characters written or \-1 if an error occurred.
|
|||
.PP
|
||||
\&\fBASN1_STRING_print()\fR returns 1 on success or 0 on error.
|
||||
.PP
|
||||
\&\fBASN1_tag2str()\fR returns a human-readable name of the specified \s-1ASN.1\s0 \fItag\fR.
|
||||
\&\fBASN1_tag2str()\fR returns a human\-readable name of the specified ASN.1 \fItag\fR.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBX509_NAME_print_ex\fR\|(3),
|
||||
\&\fBASN1_tag2str\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2002\-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_TIME_SET 3ossl"
|
||||
.TH ASN1_TIME_SET 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_TIME_SET 3ossl 2025-03-25 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_TIME_set, ASN1_UTCTIME_set, ASN1_GENERALIZEDTIME_set,
|
||||
ASN1_TIME_adj, ASN1_UTCTIME_adj, ASN1_GENERALIZEDTIME_adj,
|
||||
ASN1_TIME_check, ASN1_UTCTIME_check, ASN1_GENERALIZEDTIME_check,
|
||||
|
|
@ -152,7 +77,7 @@ ASN1_TIME_cmp_time_t, ASN1_UTCTIME_cmp_time_t,
|
|||
ASN1_TIME_compare,
|
||||
ASN1_TIME_to_generalizedtime,
|
||||
ASN1_TIME_dup, ASN1_UTCTIME_dup, ASN1_GENERALIZEDTIME_dup \- ASN.1 Time functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 4
|
||||
\& ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
|
||||
|
|
@ -201,60 +126,60 @@ ASN1_TIME_dup, ASN1_UTCTIME_dup, ASN1_GENERALIZEDTIME_dup \- ASN.1 Time function
|
|||
\& ASN1_UTCTIME *ASN1_UTCTIME_dup(const ASN1_UTCTIME *t);
|
||||
\& ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_dup(const ASN1_GENERALIZEDTIME *t);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fBASN1_TIME_set()\fR, \fBASN1_UTCTIME_set()\fR and \fBASN1_GENERALIZEDTIME_set()\fR
|
||||
functions set the structure \fIs\fR to the time represented by the time_t
|
||||
value \fIt\fR. If \fIs\fR is \s-1NULL\s0 a new time structure is allocated and returned.
|
||||
value \fIt\fR. If \fIs\fR is NULL a new time structure is allocated and returned.
|
||||
.PP
|
||||
The \fBASN1_TIME_adj()\fR, \fBASN1_UTCTIME_adj()\fR and \fBASN1_GENERALIZEDTIME_adj()\fR
|
||||
functions set the time structure \fIs\fR to the time represented
|
||||
by the time \fIoffset_day\fR and \fIoffset_sec\fR after the time_t value \fIt\fR.
|
||||
The values of \fIoffset_day\fR or \fIoffset_sec\fR can be negative to set a
|
||||
time before \fIt\fR. The \fIoffset_sec\fR value can also exceed the number of
|
||||
seconds in a day. If \fIs\fR is \s-1NULL\s0 a new structure is allocated
|
||||
seconds in a day. If \fIs\fR is NULL a new structure is allocated
|
||||
and returned.
|
||||
.PP
|
||||
The \fBASN1_TIME_set_string()\fR, \fBASN1_UTCTIME_set_string()\fR and
|
||||
\&\fBASN1_GENERALIZEDTIME_set_string()\fR functions set the time structure \fIs\fR
|
||||
to the time represented by string \fIstr\fR which must be in appropriate \s-1ASN.1\s0
|
||||
time format (for example \s-1YYMMDDHHMMSSZ\s0 or \s-1YYYYMMDDHHMMSSZ\s0). If \fIs\fR is \s-1NULL\s0
|
||||
to the time represented by string \fIstr\fR which must be in appropriate ASN.1
|
||||
time format (for example YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ). If \fIs\fR is NULL
|
||||
this function performs a format check on \fIstr\fR only. The string \fIstr\fR
|
||||
is copied into \fIs\fR.
|
||||
.PP
|
||||
\&\fBASN1_TIME_set_string_X509()\fR sets \fB\s-1ASN1_TIME\s0\fR structure \fIs\fR to the time
|
||||
\&\fBASN1_TIME_set_string_X509()\fR sets \fBASN1_TIME\fR structure \fIs\fR to the time
|
||||
represented by string \fIstr\fR which must be in appropriate time format
|
||||
that \s-1RFC 5280\s0 requires, which means it only allows \s-1YYMMDDHHMMSSZ\s0 and
|
||||
\&\s-1YYYYMMDDHHMMSSZ\s0 (leap second is rejected), all other \s-1ASN.1\s0 time format
|
||||
are not allowed. If \fIs\fR is \s-1NULL\s0 this function performs a format check
|
||||
that RFC 5280 requires, which means it only allows YYMMDDHHMMSSZ and
|
||||
YYYYMMDDHHMMSSZ (leap second is rejected), all other ASN.1 time format
|
||||
are not allowed. If \fIs\fR is NULL this function performs a format check
|
||||
on \fIstr\fR only.
|
||||
.PP
|
||||
The \fBASN1_TIME_normalize()\fR function converts an \fB\s-1ASN1_GENERALIZEDTIME\s0\fR or
|
||||
\&\fB\s-1ASN1_UTCTIME\s0\fR into a time value that can be used in a certificate. It
|
||||
The \fBASN1_TIME_normalize()\fR function converts an \fBASN1_GENERALIZEDTIME\fR or
|
||||
\&\fBASN1_UTCTIME\fR into a time value that can be used in a certificate. It
|
||||
should be used after the \fBASN1_TIME_set_string()\fR functions and before
|
||||
\&\fBASN1_TIME_print()\fR functions to get consistent (i.e. \s-1GMT\s0) results.
|
||||
\&\fBASN1_TIME_print()\fR functions to get consistent (i.e. GMT) results.
|
||||
.PP
|
||||
The \fBASN1_TIME_check()\fR, \fBASN1_UTCTIME_check()\fR and \fBASN1_GENERALIZEDTIME_check()\fR
|
||||
functions check the syntax of the time structure \fIs\fR.
|
||||
.PP
|
||||
The \fBASN1_TIME_print()\fR, \fBASN1_UTCTIME_print()\fR and \fBASN1_GENERALIZEDTIME_print()\fR
|
||||
functions print the time structure \fIs\fR to \s-1BIO\s0 \fIb\fR in human readable
|
||||
format. It will be of the format \s-1MMM DD HH:MM:SS YYYY\s0 [\s-1GMT\s0], for example
|
||||
\&\*(L"Feb 3 00:55:52 2015 \s-1GMT\*(R",\s0 which does not include a newline.
|
||||
If the time structure has invalid format it prints out \*(L"Bad time value\*(R" and
|
||||
functions print the time structure \fIs\fR to BIO \fIb\fR in human readable
|
||||
format. It will be of the format MMM DD HH:MM:SS[.s*] YYYY GMT, for example
|
||||
"Feb 3 00:55:52 2015 GMT", which does not include a newline.
|
||||
If the time structure has invalid format it prints out "Bad time value" and
|
||||
returns an error. The output for generalized time may include a fractional part
|
||||
following the second.
|
||||
.PP
|
||||
\&\fBASN1_TIME_print_ex()\fR provides \fIflags\fR to specify the output format of the
|
||||
datetime. This can be either \fB\s-1ASN1_DTFLGS_RFC822\s0\fR or \fB\s-1ASN1_DTFLGS_ISO8601\s0\fR.
|
||||
datetime. This can be either \fBASN1_DTFLGS_RFC822\fR or \fBASN1_DTFLGS_ISO8601\fR.
|
||||
.PP
|
||||
\&\fBASN1_TIME_to_tm()\fR converts the time \fIs\fR to the standard \fItm\fR structure.
|
||||
If \fIs\fR is \s-1NULL,\s0 then the current time is converted. The output time is \s-1GMT.\s0
|
||||
If \fIs\fR is NULL, then the current time is converted. The output time is GMT.
|
||||
The \fItm_sec\fR, \fItm_min\fR, \fItm_hour\fR, \fItm_mday\fR, \fItm_wday\fR, \fItm_yday\fR,
|
||||
\&\fItm_mon\fR and \fItm_year\fR fields of \fItm\fR structure are set to proper values,
|
||||
whereas all other fields are set to 0. If \fItm\fR is \s-1NULL\s0 this function performs
|
||||
whereas all other fields are set to 0. If \fItm\fR is NULL this function performs
|
||||
a format check on \fIs\fR only. If \fIs\fR is in Generalized format with fractional
|
||||
seconds, e.g. \s-1YYYYMMDDHHMMSS.SSSZ,\s0 the fractional seconds will be lost while
|
||||
seconds, e.g. YYYYMMDDHHMMSS.SSSZ, the fractional seconds will be lost while
|
||||
converting \fIs\fR to \fItm\fR structure.
|
||||
.PP
|
||||
\&\fBASN1_TIME_diff()\fR sets \fI*pday\fR and \fI*psec\fR to the time difference between
|
||||
|
|
@ -265,7 +190,7 @@ one or both of \fI*pday\fR and \fI*psec\fR will be negative. If \fIto\fR and \fI
|
|||
represent the same time then \fI*pday\fR and \fI*psec\fR will both be zero.
|
||||
If both \fI*pday\fR and \fI*psec\fR are nonzero they will always have the same
|
||||
sign. The value of \fI*psec\fR will always be less than the number of seconds
|
||||
in a day. If \fIfrom\fR or \fIto\fR is \s-1NULL\s0 the current time is used.
|
||||
in a day. If \fIfrom\fR or \fIto\fR is NULL the current time is used.
|
||||
.PP
|
||||
The \fBASN1_TIME_cmp_time_t()\fR and \fBASN1_UTCTIME_cmp_time_t()\fR functions compare
|
||||
the two times represented by the time structure \fIs\fR and the time_t \fIt\fR.
|
||||
|
|
@ -273,29 +198,29 @@ the two times represented by the time structure \fIs\fR and the time_t \fIt\fR.
|
|||
The \fBASN1_TIME_compare()\fR function compares the two times represented by the
|
||||
time structures \fIa\fR and \fIb\fR.
|
||||
.PP
|
||||
The \fBASN1_TIME_to_generalizedtime()\fR function converts an \fB\s-1ASN1_TIME\s0\fR to an
|
||||
\&\fB\s-1ASN1_GENERALIZEDTIME\s0\fR, regardless of year. If either \fIout\fR or
|
||||
\&\fI*out\fR are \s-1NULL,\s0 then a new object is allocated and must be freed after use.
|
||||
The \fBASN1_TIME_to_generalizedtime()\fR function converts an \fBASN1_TIME\fR to an
|
||||
\&\fBASN1_GENERALIZEDTIME\fR, regardless of year. If either \fIout\fR or
|
||||
\&\fI*out\fR are NULL, then a new object is allocated and must be freed after use.
|
||||
.PP
|
||||
The \fBASN1_TIME_dup()\fR, \fBASN1_UTCTIME_dup()\fR and \fBASN1_GENERALIZEDTIME_dup()\fR functions
|
||||
duplicate the time structure \fIt\fR and return the duplicated result
|
||||
correspondingly.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The \fB\s-1ASN1_TIME\s0\fR structure corresponds to the \s-1ASN.1\s0 structure \fBTime\fR
|
||||
defined in \s-1RFC5280\s0 et al. The time setting functions obey the rules outlined
|
||||
in \s-1RFC5280:\s0 if the date can be represented by UTCTime it is used, else
|
||||
The \fBASN1_TIME\fR structure corresponds to the ASN.1 structure \fBTime\fR
|
||||
defined in RFC5280 et al. The time setting functions obey the rules outlined
|
||||
in RFC5280: if the date can be represented by UTCTime it is used, else
|
||||
GeneralizedTime is used.
|
||||
.PP
|
||||
The \fB\s-1ASN1_TIME\s0\fR, \fB\s-1ASN1_UTCTIME\s0\fR and \fB\s-1ASN1_GENERALIZEDTIME\s0\fR structures are
|
||||
represented as an \fB\s-1ASN1_STRING\s0\fR internally and can be freed up using
|
||||
The \fBASN1_TIME\fR, \fBASN1_UTCTIME\fR and \fBASN1_GENERALIZEDTIME\fR structures are
|
||||
represented as an \fBASN1_STRING\fR internally and can be freed up using
|
||||
\&\fBASN1_STRING_free()\fR.
|
||||
.PP
|
||||
The \fB\s-1ASN1_TIME\s0\fR structure can represent years from 0000 to 9999 but no attempt
|
||||
The \fBASN1_TIME\fR structure can represent years from 0000 to 9999 but no attempt
|
||||
is made to correct ancient calendar changes (for example from Julian to
|
||||
Gregorian calendars).
|
||||
.PP
|
||||
\&\fB\s-1ASN1_UTCTIME\s0\fR is limited to a year range of 1950 through 2049.
|
||||
\&\fBASN1_UTCTIME\fR is limited to a year range of 1950 through 2049.
|
||||
.PP
|
||||
Some applications add offset times directly to a time_t value and pass the
|
||||
results to \fBASN1_TIME_set()\fR (or equivalent). This can cause problems as the
|
||||
|
|
@ -304,33 +229,37 @@ New applications should use \fBASN1_TIME_adj()\fR instead and pass the offset va
|
|||
in the \fIoffset_sec\fR and \fIoffset_day\fR parameters instead of directly
|
||||
manipulating a time_t value.
|
||||
.PP
|
||||
\&\fBASN1_TIME_adj()\fR may change the type from \fB\s-1ASN1_GENERALIZEDTIME\s0\fR to
|
||||
\&\fB\s-1ASN1_UTCTIME\s0\fR, or vice versa, based on the resulting year.
|
||||
\&\fBASN1_TIME_adj()\fR may change the type from \fBASN1_GENERALIZEDTIME\fR to
|
||||
\&\fBASN1_UTCTIME\fR, or vice versa, based on the resulting year.
|
||||
\&\fBASN1_GENERALIZEDTIME_adj()\fR and \fBASN1_UTCTIME_adj()\fR will not modify the type
|
||||
of the return structure.
|
||||
.PP
|
||||
It is recommended that functions starting with \fB\s-1ASN1_TIME\s0\fR be used instead of
|
||||
those starting with \fB\s-1ASN1_UTCTIME\s0\fR or \fB\s-1ASN1_GENERALIZEDTIME\s0\fR. The functions
|
||||
starting with \fB\s-1ASN1_UTCTIME\s0\fR and \fB\s-1ASN1_GENERALIZEDTIME\s0\fR act only on that
|
||||
specific time format. The functions starting with \fB\s-1ASN1_TIME\s0\fR will operate on
|
||||
It is recommended that functions starting with \fBASN1_TIME\fR be used instead of
|
||||
those starting with \fBASN1_UTCTIME\fR or \fBASN1_GENERALIZEDTIME\fR. The functions
|
||||
starting with \fBASN1_UTCTIME\fR and \fBASN1_GENERALIZEDTIME\fR act only on that
|
||||
specific time format. The functions starting with \fBASN1_TIME\fR will operate on
|
||||
either format.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
Users familiar with RFC822 should note that when specifying the flag
|
||||
\&\fBASN1_DTFLGS_RFC822\fR the year will be formatted as documented above,
|
||||
i.e., using 4 digits, not 2 as specified in RFC822.
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
\&\fBASN1_TIME_print()\fR, \fBASN1_UTCTIME_print()\fR and \fBASN1_GENERALIZEDTIME_print()\fR do
|
||||
not print out the timezone: it either prints out \*(L"\s-1GMT\*(R"\s0 or nothing. But all
|
||||
certificates complying with \s-1RFC5280\s0 et al use \s-1GMT\s0 anyway.
|
||||
not print out the timezone: it either prints out "GMT" or nothing. But all
|
||||
certificates complying with RFC5280 et al use GMT anyway.
|
||||
.PP
|
||||
\&\fBASN1_TIME_print()\fR, \fBASN1_TIME_print_ex()\fR, \fBASN1_UTCTIME_print()\fR and
|
||||
\&\fBASN1_GENERALIZEDTIME_print()\fR do not distinguish if they fail because
|
||||
of an I/O error or invalid time format.
|
||||
.PP
|
||||
Use the \fBASN1_TIME_normalize()\fR function to normalize the time value before
|
||||
printing to get \s-1GMT\s0 results.
|
||||
printing to get GMT results.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_TIME_set()\fR, \fBASN1_UTCTIME_set()\fR, \fBASN1_GENERALIZEDTIME_set()\fR,
|
||||
\&\fBASN1_TIME_adj()\fR, \fBASN1_UTCTIME_adj()\fR and \fBASN1_GENERALIZEDTIME_set()\fR return
|
||||
a pointer to a time structure or \s-1NULL\s0 if an error occurred.
|
||||
a pointer to a time structure or NULL if an error occurred.
|
||||
.PP
|
||||
\&\fBASN1_TIME_set_string()\fR, \fBASN1_UTCTIME_set_string()\fR,
|
||||
\&\fBASN1_GENERALIZEDTIME_set_string()\fR and \fBASN1_TIME_set_string_X509()\fR return
|
||||
|
|
@ -349,7 +278,7 @@ return 1 if the time is successfully printed out and
|
|||
error occurred (invalid time format).
|
||||
.PP
|
||||
\&\fBASN1_TIME_diff()\fR returns 1 for success and 0 for failure. It can fail if the
|
||||
passed-in time structure has invalid syntax, for example.
|
||||
passed\-in time structure has invalid syntax, for example.
|
||||
.PP
|
||||
\&\fBASN1_TIME_cmp_time_t()\fR and \fBASN1_UTCTIME_cmp_time_t()\fR return \-1 if \fIs\fR is
|
||||
before \fIt\fR, 0 if \fIs\fR equals \fIt\fR, or 1 if \fIs\fR is after \fIt\fR. \-2 is returned
|
||||
|
|
@ -359,11 +288,11 @@ on error.
|
|||
or 1 if \fIa\fR is after \fIb\fR. \-2 is returned on error.
|
||||
.PP
|
||||
\&\fBASN1_TIME_to_generalizedtime()\fR returns a pointer to the appropriate time
|
||||
structure on success or \s-1NULL\s0 if an error occurred.
|
||||
structure on success or NULL if an error occurred.
|
||||
.PP
|
||||
\&\fBASN1_TIME_dup()\fR, \fBASN1_UTCTIME_dup()\fR and \fBASN1_GENERALIZEDTIME_dup()\fR return a
|
||||
pointer to a time structure or \s-1NULL\s0 if an error occurred.
|
||||
.SH "EXAMPLES"
|
||||
pointer to a time structure or NULL if an error occurred.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
Set a time structure to one hour after the current time and print it out:
|
||||
.PP
|
||||
|
|
@ -398,18 +327,18 @@ Determine if one time is later or sooner than the current time:
|
|||
\& else
|
||||
\& printf("Same\en");
|
||||
.Ve
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBASN1_TIME_to_tm()\fR function was added in OpenSSL 1.1.1.
|
||||
The \fBASN1_TIME_set_string_X509()\fR function was added in OpenSSL 1.1.1.
|
||||
The \fBASN1_TIME_normalize()\fR function was added in OpenSSL 1.1.1.
|
||||
The \fBASN1_TIME_cmp_time_t()\fR function was added in OpenSSL 1.1.1.
|
||||
The \fBASN1_TIME_compare()\fR function was added in OpenSSL 1.1.1.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2015\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2015\-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_TYPE_GET 3ossl"
|
||||
.TH ASN1_TYPE_GET 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_TYPE_GET 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_TYPE_get, ASN1_TYPE_set, ASN1_TYPE_set1, ASN1_TYPE_cmp, ASN1_TYPE_unpack_sequence, ASN1_TYPE_pack_sequence \- ASN1_TYPE utility
|
||||
functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -155,11 +80,11 @@ functions
|
|||
\& ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s,
|
||||
\& ASN1_TYPE **t);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions allow an \fB\s-1ASN1_TYPE\s0\fR structure to be manipulated. The
|
||||
\&\fB\s-1ASN1_TYPE\s0\fR structure can contain any \s-1ASN.1\s0 type or constructed type
|
||||
such as a \s-1SEQUENCE:\s0 it is effectively equivalent to the \s-1ASN.1 ANY\s0 type.
|
||||
These functions allow an \fBASN1_TYPE\fR structure to be manipulated. The
|
||||
\&\fBASN1_TYPE\fR structure can contain any ASN.1 type or constructed type
|
||||
such as a SEQUENCE: it is effectively equivalent to the ASN.1 ANY type.
|
||||
.PP
|
||||
\&\fBASN1_TYPE_get()\fR returns the type of \fIa\fR or 0 if it fails.
|
||||
.PP
|
||||
|
|
@ -169,48 +94,48 @@ up after the call.
|
|||
.PP
|
||||
\&\fBASN1_TYPE_set1()\fR sets the value of \fIa\fR to \fItype\fR a copy of \fIvalue\fR.
|
||||
.PP
|
||||
\&\fBASN1_TYPE_cmp()\fR compares \s-1ASN.1\s0 types \fIa\fR and \fIb\fR and returns 0 if
|
||||
\&\fBASN1_TYPE_cmp()\fR compares ASN.1 types \fIa\fR and \fIb\fR and returns 0 if
|
||||
they are identical and nonzero otherwise.
|
||||
.PP
|
||||
\&\fBASN1_TYPE_unpack_sequence()\fR attempts to parse the \s-1SEQUENCE\s0 present in
|
||||
\&\fIt\fR using the \s-1ASN.1\s0 structure \fIit\fR. If successful it returns a pointer
|
||||
to the \s-1ASN.1\s0 structure corresponding to \fIit\fR which must be freed by the
|
||||
caller. If it fails it return \s-1NULL.\s0
|
||||
\&\fBASN1_TYPE_unpack_sequence()\fR attempts to parse the SEQUENCE present in
|
||||
\&\fIt\fR using the ASN.1 structure \fIit\fR. If successful it returns a pointer
|
||||
to the ASN.1 structure corresponding to \fIit\fR which must be freed by the
|
||||
caller. If it fails it return NULL.
|
||||
.PP
|
||||
\&\fBASN1_TYPE_pack_sequence()\fR attempts to encode the \s-1ASN.1\s0 structure \fIs\fR
|
||||
corresponding to \fIit\fR into an \fB\s-1ASN1_TYPE\s0\fR. If successful the encoded
|
||||
\&\fB\s-1ASN1_TYPE\s0\fR is returned. If \fIt\fR and \fI*t\fR are not \s-1NULL\s0 the encoded type
|
||||
is written to \fIt\fR overwriting any existing data. If \fIt\fR is not \s-1NULL\s0
|
||||
but \fI*t\fR is \s-1NULL\s0 the returned \fB\s-1ASN1_TYPE\s0\fR is written to \fI*t\fR.
|
||||
.SH "NOTES"
|
||||
\&\fBASN1_TYPE_pack_sequence()\fR attempts to encode the ASN.1 structure \fIs\fR
|
||||
corresponding to \fIit\fR into an \fBASN1_TYPE\fR. If successful the encoded
|
||||
\&\fBASN1_TYPE\fR is returned. If \fIt\fR and \fI*t\fR are not NULL the encoded type
|
||||
is written to \fIt\fR overwriting any existing data. If \fIt\fR is not NULL
|
||||
but \fI*t\fR is NULL the returned \fBASN1_TYPE\fR is written to \fI*t\fR.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The type and meaning of the \fIvalue\fR parameter for \fBASN1_TYPE_set()\fR and
|
||||
\&\fBASN1_TYPE_set1()\fR is determined by the \fItype\fR parameter.
|
||||
If \fItype\fR is \fBV_ASN1_NULL\fR \fIvalue\fR is ignored. If \fItype\fR is
|
||||
\&\fBV_ASN1_BOOLEAN\fR
|
||||
then the boolean is set to \s-1TRUE\s0 if \fIvalue\fR is not \s-1NULL.\s0 If \fItype\fR is
|
||||
\&\fBV_ASN1_OBJECT\fR then value is an \fB\s-1ASN1_OBJECT\s0\fR structure. Otherwise \fItype\fR
|
||||
is and \fB\s-1ASN1_STRING\s0\fR structure. If \fItype\fR corresponds to a primitive type
|
||||
(or a string type) then the contents of the \fB\s-1ASN1_STRING\s0\fR contain the content
|
||||
then the boolean is set to TRUE if \fIvalue\fR is not NULL. If \fItype\fR is
|
||||
\&\fBV_ASN1_OBJECT\fR then value is an \fBASN1_OBJECT\fR structure. Otherwise \fItype\fR
|
||||
is and \fBASN1_STRING\fR structure. If \fItype\fR corresponds to a primitive type
|
||||
(or a string type) then the contents of the \fBASN1_STRING\fR contain the content
|
||||
octets of the type. If \fItype\fR corresponds to a constructed type or
|
||||
a tagged type (\fBV_ASN1_SEQUENCE\fR, \fBV_ASN1_SET\fR or \fBV_ASN1_OTHER\fR) then the
|
||||
\&\fB\s-1ASN1_STRING\s0\fR contains the entire \s-1ASN.1\s0 encoding verbatim (including tag and
|
||||
\&\fBASN1_STRING\fR contains the entire ASN.1 encoding verbatim (including tag and
|
||||
length octets).
|
||||
.PP
|
||||
\&\fBASN1_TYPE_cmp()\fR may not return zero if two types are equivalent but have
|
||||
different encodings. For example the single content octet of the boolean \s-1TRUE\s0
|
||||
value under \s-1BER\s0 can have any nonzero encoding but \fBASN1_TYPE_cmp()\fR will
|
||||
different encodings. For example the single content octet of the boolean TRUE
|
||||
value under BER can have any nonzero encoding but \fBASN1_TYPE_cmp()\fR will
|
||||
only return zero if the values are the same.
|
||||
.PP
|
||||
If either or both of the parameters passed to \fBASN1_TYPE_cmp()\fR is \s-1NULL\s0 the
|
||||
return value is nonzero. Technically if both parameters are \s-1NULL\s0 the two
|
||||
types could be absent \s-1OPTIONAL\s0 fields and so should match, however, passing
|
||||
\&\s-1NULL\s0 values could also indicate a programming error (for example an
|
||||
unparsable type which returns \s-1NULL\s0) for types which do \fBnot\fR match. So
|
||||
If either or both of the parameters passed to \fBASN1_TYPE_cmp()\fR is NULL the
|
||||
return value is nonzero. Technically if both parameters are NULL the two
|
||||
types could be absent OPTIONAL fields and so should match, however, passing
|
||||
NULL values could also indicate a programming error (for example an
|
||||
unparsable type which returns NULL) for types which do \fBnot\fR match. So
|
||||
applications should handle the case of two absent values separately.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_TYPE_get()\fR returns the type of the \fB\s-1ASN1_TYPE\s0\fR argument.
|
||||
\&\fBASN1_TYPE_get()\fR returns the type of the \fBASN1_TYPE\fR argument.
|
||||
.PP
|
||||
\&\fBASN1_TYPE_set()\fR does not return a value.
|
||||
.PP
|
||||
|
|
@ -218,16 +143,16 @@ applications should handle the case of two absent values separately.
|
|||
.PP
|
||||
\&\fBASN1_TYPE_cmp()\fR returns 0 if the types are identical and nonzero otherwise.
|
||||
.PP
|
||||
\&\fBASN1_TYPE_unpack_sequence()\fR returns a pointer to an \s-1ASN.1\s0 structure or
|
||||
\&\s-1NULL\s0 on failure.
|
||||
\&\fBASN1_TYPE_unpack_sequence()\fR returns a pointer to an ASN.1 structure or
|
||||
NULL on failure.
|
||||
.PP
|
||||
\&\fBASN1_TYPE_pack_sequence()\fR return an \fB\s-1ASN1_TYPE\s0\fR structure if it succeeds or
|
||||
\&\s-1NULL\s0 on failure.
|
||||
.SH "COPYRIGHT"
|
||||
\&\fBASN1_TYPE_pack_sequence()\fR return an \fBASN1_TYPE\fR structure if it succeeds or
|
||||
NULL on failure.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2015\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_AUX_CB 3ossl"
|
||||
.TH ASN1_AUX_CB 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_AUX_CB 3ossl 2025-03-25 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_AUX, ASN1_PRINT_ARG, ASN1_STREAM_ARG, ASN1_aux_cb, ASN1_aux_const_cb
|
||||
\&\- ASN.1 auxiliary data
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1t.h>
|
||||
|
|
@ -176,175 +101,175 @@ ASN1_AUX, ASN1_PRINT_ARG, ASN1_STREAM_ARG, ASN1_aux_cb, ASN1_aux_const_cb
|
|||
\& typedef int ASN1_aux_const_cb(int operation, const ASN1_VALUE **in,
|
||||
\& const ASN1_ITEM *it, void *exarg);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\s-1ASN.1\s0 data structures can be associated with an \fB\s-1ASN1_AUX\s0\fR object to supply
|
||||
additional information about the \s-1ASN.1\s0 structure. An \fB\s-1ASN1_AUX\s0\fR structure is
|
||||
associated with the structure during the definition of the \s-1ASN.1\s0 template. For
|
||||
example an \fB\s-1ASN1_AUX\s0\fR structure will be associated by using one of the various
|
||||
\&\s-1ASN.1\s0 template definition macros that supply auxiliary information such as
|
||||
ASN.1 data structures can be associated with an \fBASN1_AUX\fR object to supply
|
||||
additional information about the ASN.1 structure. An \fBASN1_AUX\fR structure is
|
||||
associated with the structure during the definition of the ASN.1 template. For
|
||||
example an \fBASN1_AUX\fR structure will be associated by using one of the various
|
||||
ASN.1 template definition macros that supply auxiliary information such as
|
||||
\&\fBASN1_SEQUENCE_enc()\fR, \fBASN1_SEQUENCE_ref()\fR, \fBASN1_SEQUENCE_cb_const_cb()\fR,
|
||||
\&\fBASN1_SEQUENCE_const_cb()\fR, \fBASN1_SEQUENCE_cb()\fR or \fBASN1_NDEF_SEQUENCE_cb()\fR.
|
||||
.PP
|
||||
An \fB\s-1ASN1_AUX\s0\fR structure contains the following information.
|
||||
.IP "\fIapp_data\fR" 4
|
||||
An \fBASN1_AUX\fR structure contains the following information.
|
||||
.IP \fIapp_data\fR 4
|
||||
.IX Item "app_data"
|
||||
Arbitrary application data
|
||||
.IP "\fIflags\fR" 4
|
||||
.IP \fIflags\fR 4
|
||||
.IX Item "flags"
|
||||
Flags which indicate the auxiliarly functionality supported.
|
||||
.Sp
|
||||
The \fB\s-1ASN1_AFLG_REFCOUNT\s0\fR flag indicates that objects support reference counting.
|
||||
The \fBASN1_AFLG_REFCOUNT\fR flag indicates that objects support reference counting.
|
||||
.Sp
|
||||
The \fB\s-1ASN1_AFLG_ENCODING\s0\fR flag indicates that the original encoding of the
|
||||
The \fBASN1_AFLG_ENCODING\fR flag indicates that the original encoding of the
|
||||
object will be saved.
|
||||
.Sp
|
||||
The \fB\s-1ASN1_AFLG_BROKEN\s0\fR flag is a work around for broken encoders where the
|
||||
The \fBASN1_AFLG_BROKEN\fR flag is a work around for broken encoders where the
|
||||
sequence length value may not be correct. This should generally not be used.
|
||||
.Sp
|
||||
The \fB\s-1ASN1_AFLG_CONST_CB\s0\fR flag indicates that the \*(L"const\*(R" form of the
|
||||
\&\fB\s-1ASN1_AUX\s0\fR callback should be used in preference to the non-const form.
|
||||
.IP "\fIref_offset\fR" 4
|
||||
The \fBASN1_AFLG_CONST_CB\fR flag indicates that the "const" form of the
|
||||
\&\fBASN1_AUX\fR callback should be used in preference to the non\-const form.
|
||||
.IP \fIref_offset\fR 4
|
||||
.IX Item "ref_offset"
|
||||
If the \fB\s-1ASN1_AFLG_REFCOUNT\s0\fR flag is set then this value is assumed to be an
|
||||
offset into the \fB\s-1ASN1_VALUE\s0\fR structure where a \fB\s-1CRYPTO_REF_COUNT\s0\fR may be
|
||||
If the \fBASN1_AFLG_REFCOUNT\fR flag is set then this value is assumed to be an
|
||||
offset into the \fBASN1_VALUE\fR structure where a \fBCRYPTO_REF_COUNT\fR may be
|
||||
found for the purposes of reference counting.
|
||||
.IP "\fIref_lock\fR" 4
|
||||
.IP \fIref_lock\fR 4
|
||||
.IX Item "ref_lock"
|
||||
If the \fB\s-1ASN1_AFLG_REFCOUNT\s0\fR flag is set then this value is assumed to be an
|
||||
offset into the \fB\s-1ASN1_VALUE\s0\fR structure where a \fB\s-1CRYPTO_RWLOCK\s0\fR may be
|
||||
If the \fBASN1_AFLG_REFCOUNT\fR flag is set then this value is assumed to be an
|
||||
offset into the \fBASN1_VALUE\fR structure where a \fBCRYPTO_RWLOCK\fR may be
|
||||
found for the purposes of reference counting.
|
||||
.IP "\fIasn1_cb\fR" 4
|
||||
.IP \fIasn1_cb\fR 4
|
||||
.IX Item "asn1_cb"
|
||||
A callback that will be invoked at various points during the processing of
|
||||
the the \fB\s-1ASN1_VALLUE\s0\fR. See below for further details.
|
||||
.IP "\fIenc_offset\fR" 4
|
||||
the \fBASN1_VALUE\fR. See below for further details.
|
||||
.IP \fIenc_offset\fR 4
|
||||
.IX Item "enc_offset"
|
||||
Offset into the \fB\s-1ASN1_VALUE\s0\fR object where the original encoding of the object
|
||||
will be saved if the \fB\s-1ASN1_AFLG_ENCODING\s0\fR flag has been set.
|
||||
.IP "\fIasn1_const_cb\fR" 4
|
||||
Offset into the \fBASN1_VALUE\fR object where the original encoding of the object
|
||||
will be saved if the \fBASN1_AFLG_ENCODING\fR flag has been set.
|
||||
.IP \fIasn1_const_cb\fR 4
|
||||
.IX Item "asn1_const_cb"
|
||||
A callback that will be invoked at various points during the processing of
|
||||
the the \fB\s-1ASN1_VALLUE\s0\fR. This is used in preference to the \fIasn1_cb\fR callback if
|
||||
the \fB\s-1ASN1_AFLG_CONST_CB\s0\fR flag is set. See below for further details.
|
||||
the \fBASN1_VALUE\fR. This is used in preference to the \fIasn1_cb\fR callback if
|
||||
the \fBASN1_AFLG_CONST_CB\fR flag is set. See below for further details.
|
||||
.PP
|
||||
During the processing of an \fB\s-1ASN1_VALUE\s0\fR object the callbacks set via
|
||||
During the processing of an \fBASN1_VALUE\fR object the callbacks set via
|
||||
\&\fIasn1_cb\fR or \fIasn1_const_cb\fR will be invoked as a result of various events
|
||||
indicated via the \fIoperation\fR parameter. The value of \fI*in\fR will be the
|
||||
\&\fB\s-1ASN1_VALUE\s0\fR object being processed based on the template in \fIit\fR. An
|
||||
\&\fBASN1_VALUE\fR object being processed based on the template in \fIit\fR. An
|
||||
additional operation specific parameter may be passed in \fIexarg\fR. The currently
|
||||
supported operations are as follows. The callbacks should return a positive
|
||||
value on success or zero on error, unless otherwise noted below.
|
||||
.IP "\fB\s-1ASN1_OP_NEW_PRE\s0\fR" 4
|
||||
.IP \fBASN1_OP_NEW_PRE\fR 4
|
||||
.IX Item "ASN1_OP_NEW_PRE"
|
||||
Invoked when processing a \fB\s-1CHOICE\s0\fR, \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure
|
||||
prior to an \fB\s-1ASN1_VALUE\s0\fR object being allocated. The callback may allocate the
|
||||
\&\fB\s-1ASN1_VALUE\s0\fR itself and store it in \fI*pval\fR. If it does so it should return 2
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
prior to an \fBASN1_VALUE\fR object being allocated. The callback may allocate the
|
||||
\&\fBASN1_VALUE\fR itself and store it in \fI*pval\fR. If it does so it should return 2
|
||||
from the callback. On error it should return 0.
|
||||
.IP "\fB\s-1ASN1_OP_NEW_POST\s0\fR" 4
|
||||
.IP \fBASN1_OP_NEW_POST\fR 4
|
||||
.IX Item "ASN1_OP_NEW_POST"
|
||||
Invoked when processing a \fB\s-1CHOICE\s0\fR, \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure
|
||||
after an \fB\s-1ASN1_VALUE\s0\fR object has been allocated. The allocated object is in
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
after an \fBASN1_VALUE\fR object has been allocated. The allocated object is in
|
||||
\&\fI*pval\fR.
|
||||
.IP "\fB\s-1ASN1_OP_FREE_PRE\s0\fR" 4
|
||||
.IP \fBASN1_OP_FREE_PRE\fR 4
|
||||
.IX Item "ASN1_OP_FREE_PRE"
|
||||
Invoked when processing a \fB\s-1CHOICE\s0\fR, \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure
|
||||
immediately before an \fB\s-1ASN1_VALUE\s0\fR is freed. If the callback originally
|
||||
constructed the \fB\s-1ASN1_VALUE\s0\fR via \fB\s-1ASN1_OP_NEW_PRE\s0\fR then it should free it at
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
immediately before an \fBASN1_VALUE\fR is freed. If the callback originally
|
||||
constructed the \fBASN1_VALUE\fR via \fBASN1_OP_NEW_PRE\fR then it should free it at
|
||||
this point and return 2 from the callback. Otherwise it should return 1 for
|
||||
success or 0 on error.
|
||||
.IP "\fB\s-1ASN1_OP_FREE_POST\s0\fR" 4
|
||||
.IP \fBASN1_OP_FREE_POST\fR 4
|
||||
.IX Item "ASN1_OP_FREE_POST"
|
||||
Invoked when processing a \fB\s-1CHOICE\s0\fR, \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure
|
||||
immediately after \fB\s-1ASN1_VALUE\s0\fR sub-structures are freed.
|
||||
.IP "\fB\s-1ASN1_OP_D2I_PRE\s0\fR" 4
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
immediately after \fBASN1_VALUE\fR sub\-structures are freed.
|
||||
.IP \fBASN1_OP_D2I_PRE\fR 4
|
||||
.IX Item "ASN1_OP_D2I_PRE"
|
||||
Invoked when processing a \fB\s-1CHOICE\s0\fR, \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure
|
||||
immediately before a \*(L"d2i\*(R" operation for the \fB\s-1ASN1_VALUE\s0\fR.
|
||||
.IP "\fB\s-1ASN1_OP_D2I_POST\s0\fR" 4
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
immediately before a "d2i" operation for the \fBASN1_VALUE\fR.
|
||||
.IP \fBASN1_OP_D2I_POST\fR 4
|
||||
.IX Item "ASN1_OP_D2I_POST"
|
||||
Invoked when processing a \fB\s-1CHOICE\s0\fR, \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure
|
||||
immediately after a \*(L"d2i\*(R" operation for the \fB\s-1ASN1_VALUE\s0\fR.
|
||||
.IP "\fB\s-1ASN1_OP_I2D_PRE\s0\fR" 4
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
immediately after a "d2i" operation for the \fBASN1_VALUE\fR.
|
||||
.IP \fBASN1_OP_I2D_PRE\fR 4
|
||||
.IX Item "ASN1_OP_I2D_PRE"
|
||||
Invoked when processing a \fB\s-1CHOICE\s0\fR, \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure
|
||||
immediately before a \*(L"i2d\*(R" operation for the \fB\s-1ASN1_VALUE\s0\fR.
|
||||
.IP "\fB\s-1ASN1_OP_I2D_POST\s0\fR" 4
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
immediately before a "i2d" operation for the \fBASN1_VALUE\fR.
|
||||
.IP \fBASN1_OP_I2D_POST\fR 4
|
||||
.IX Item "ASN1_OP_I2D_POST"
|
||||
Invoked when processing a \fB\s-1CHOICE\s0\fR, \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure
|
||||
immediately after a \*(L"i2d\*(R" operation for the \fB\s-1ASN1_VALUE\s0\fR.
|
||||
.IP "\fB\s-1ASN1_OP_PRINT_PRE\s0\fR" 4
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
immediately after a "i2d" operation for the \fBASN1_VALUE\fR.
|
||||
.IP \fBASN1_OP_PRINT_PRE\fR 4
|
||||
.IX Item "ASN1_OP_PRINT_PRE"
|
||||
Invoked when processing a \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure immediately
|
||||
before printing the \fB\s-1ASN1_VALUE\s0\fR. The \fIexarg\fR argument will be a pointer to an
|
||||
\&\fB\s-1ASN1_PRINT_ARG\s0\fR structure (see below).
|
||||
.IP "\fB\s-1ASN1_OP_PRINT_POST\s0\fR" 4
|
||||
Invoked when processing a \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure immediately
|
||||
before printing the \fBASN1_VALUE\fR. The \fIexarg\fR argument will be a pointer to an
|
||||
\&\fBASN1_PRINT_ARG\fR structure (see below).
|
||||
.IP \fBASN1_OP_PRINT_POST\fR 4
|
||||
.IX Item "ASN1_OP_PRINT_POST"
|
||||
Invoked when processing a \fB\s-1SEQUENCE\s0\fR or \fB\s-1NDEF_SEQUENCE\s0\fR structure immediately
|
||||
after printing the \fB\s-1ASN1_VALUE\s0\fR. The \fIexarg\fR argument will be a pointer to an
|
||||
\&\fB\s-1ASN1_PRINT_ARG\s0\fR structure (see below).
|
||||
.IP "\fB\s-1ASN1_OP_STREAM_PRE\s0\fR" 4
|
||||
Invoked when processing a \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure immediately
|
||||
after printing the \fBASN1_VALUE\fR. The \fIexarg\fR argument will be a pointer to an
|
||||
\&\fBASN1_PRINT_ARG\fR structure (see below).
|
||||
.IP \fBASN1_OP_STREAM_PRE\fR 4
|
||||
.IX Item "ASN1_OP_STREAM_PRE"
|
||||
Invoked immediately prior to streaming the \fB\s-1ASN1_VALUE\s0\fR data using indefinite
|
||||
length encoding. The \fIexarg\fR argument will be a pointer to a \fB\s-1ASN1_STREAM_ARG\s0\fR
|
||||
Invoked immediately prior to streaming the \fBASN1_VALUE\fR data using indefinite
|
||||
length encoding. The \fIexarg\fR argument will be a pointer to a \fBASN1_STREAM_ARG\fR
|
||||
structure (see below).
|
||||
.IP "\fB\s-1ASN1_OP_STREAM_POST\s0\fR" 4
|
||||
.IP \fBASN1_OP_STREAM_POST\fR 4
|
||||
.IX Item "ASN1_OP_STREAM_POST"
|
||||
Invoked immediately after streaming the \fB\s-1ASN1_VALUE\s0\fR data using indefinite
|
||||
length encoding. The \fIexarg\fR argument will be a pointer to a \fB\s-1ASN1_STREAM_ARG\s0\fR
|
||||
Invoked immediately after streaming the \fBASN1_VALUE\fR data using indefinite
|
||||
length encoding. The \fIexarg\fR argument will be a pointer to a \fBASN1_STREAM_ARG\fR
|
||||
structure (see below).
|
||||
.IP "\fB\s-1ASN1_OP_DETACHED_PRE\s0\fR" 4
|
||||
.IP \fBASN1_OP_DETACHED_PRE\fR 4
|
||||
.IX Item "ASN1_OP_DETACHED_PRE"
|
||||
Invoked immediately prior to processing the \fB\s-1ASN1_VALUE\s0\fR data as a \*(L"detached\*(R"
|
||||
value (as used in \s-1CMS\s0 and \s-1PKCS7\s0). The \fIexarg\fR argument will be a pointer to a
|
||||
\&\fB\s-1ASN1_STREAM_ARG\s0\fR structure (see below).
|
||||
.IP "\fB\s-1ASN1_OP_DETACHED_POST\s0\fR" 4
|
||||
Invoked immediately prior to processing the \fBASN1_VALUE\fR data as a "detached"
|
||||
value (as used in CMS and PKCS7). The \fIexarg\fR argument will be a pointer to a
|
||||
\&\fBASN1_STREAM_ARG\fR structure (see below).
|
||||
.IP \fBASN1_OP_DETACHED_POST\fR 4
|
||||
.IX Item "ASN1_OP_DETACHED_POST"
|
||||
Invoked immediately after processing the \fB\s-1ASN1_VALUE\s0\fR data as a \*(L"detached\*(R"
|
||||
value (as used in \s-1CMS\s0 and \s-1PKCS7\s0). The \fIexarg\fR argument will be a pointer to a
|
||||
\&\fB\s-1ASN1_STREAM_ARG\s0\fR structure (see below).
|
||||
.IP "\fB\s-1ASN1_OP_DUP_PRE\s0\fR" 4
|
||||
Invoked immediately after processing the \fBASN1_VALUE\fR data as a "detached"
|
||||
value (as used in CMS and PKCS7). The \fIexarg\fR argument will be a pointer to a
|
||||
\&\fBASN1_STREAM_ARG\fR structure (see below).
|
||||
.IP \fBASN1_OP_DUP_PRE\fR 4
|
||||
.IX Item "ASN1_OP_DUP_PRE"
|
||||
Invoked immediate prior to an \s-1ASN1_VALUE\s0 being duplicated via a call to
|
||||
Invoked immediate prior to an ASN1_VALUE being duplicated via a call to
|
||||
\&\fBASN1_item_dup()\fR.
|
||||
.IP "\fB\s-1ASN1_OP_DUP_POST\s0\fR" 4
|
||||
.IP \fBASN1_OP_DUP_POST\fR 4
|
||||
.IX Item "ASN1_OP_DUP_POST"
|
||||
Invoked immediate after to an \s-1ASN1_VALUE\s0 has been duplicated via a call to
|
||||
Invoked immediate after to an ASN1_VALUE has been duplicated via a call to
|
||||
\&\fBASN1_item_dup()\fR.
|
||||
.IP "\fB\s-1ASN1_OP_GET0_LIBCTX\s0\fR" 4
|
||||
.IP \fBASN1_OP_GET0_LIBCTX\fR 4
|
||||
.IX Item "ASN1_OP_GET0_LIBCTX"
|
||||
Invoked in order to obtain the \fB\s-1OSSL_LIB_CTX\s0\fR associated with an \fB\s-1ASN1_VALUE\s0\fR
|
||||
if any. A pointer to an \fB\s-1OSSL_LIB_CTX\s0\fR should be stored in \fI*exarg\fR if such
|
||||
Invoked in order to obtain the \fBOSSL_LIB_CTX\fR associated with an \fBASN1_VALUE\fR
|
||||
if any. A pointer to an \fBOSSL_LIB_CTX\fR should be stored in \fI*exarg\fR if such
|
||||
a value exists.
|
||||
.IP "\fB\s-1ASN1_OP_GET0_PROPQ\s0\fR" 4
|
||||
.IP \fBASN1_OP_GET0_PROPQ\fR 4
|
||||
.IX Item "ASN1_OP_GET0_PROPQ"
|
||||
Invoked in order to obtain the property query string associated with an
|
||||
\&\fB\s-1ASN1_VALUE\s0\fR if any. A pointer to the property query string should be stored in
|
||||
\&\fBASN1_VALUE\fR if any. A pointer to the property query string should be stored in
|
||||
\&\fI*exarg\fR if such a value exists.
|
||||
.PP
|
||||
An \fB\s-1ASN1_PRINT_ARG\s0\fR object is used during processing of \fB\s-1ASN1_OP_PRINT_PRE\s0\fR
|
||||
and \fB\s-1ASN1_OP_PRINT_POST\s0\fR callback operations. It contains the following
|
||||
An \fBASN1_PRINT_ARG\fR object is used during processing of \fBASN1_OP_PRINT_PRE\fR
|
||||
and \fBASN1_OP_PRINT_POST\fR callback operations. It contains the following
|
||||
information.
|
||||
.IP "\fIout\fR" 4
|
||||
.IP \fIout\fR 4
|
||||
.IX Item "out"
|
||||
The \fB\s-1BIO\s0\fR being used to print the data out.
|
||||
.IP "\fIndef_bio\fR" 4
|
||||
The \fBBIO\fR being used to print the data out.
|
||||
.IP \fIndef_bio\fR 4
|
||||
.IX Item "ndef_bio"
|
||||
The current number of indent spaces that should be used for printing this data.
|
||||
.IP "\fIpctx\fR" 4
|
||||
.IP \fIpctx\fR 4
|
||||
.IX Item "pctx"
|
||||
The context for the \fB\s-1ASN1_PCTX\s0\fR operation.
|
||||
The context for the \fBASN1_PCTX\fR operation.
|
||||
.PP
|
||||
An \fB\s-1ASN1_STREAM_ARG\s0\fR object is used during processing of \fB\s-1ASN1_OP_STREAM_PRE\s0\fR,
|
||||
\&\fB\s-1ASN1_OP_STREAM_POST\s0\fR, \fB\s-1ASN1_OP_DETACHED_PRE\s0\fR and \fB\s-1ASN1_OP_DETACHED_POST\s0\fR
|
||||
An \fBASN1_STREAM_ARG\fR object is used during processing of \fBASN1_OP_STREAM_PRE\fR,
|
||||
\&\fBASN1_OP_STREAM_POST\fR, \fBASN1_OP_DETACHED_PRE\fR and \fBASN1_OP_DETACHED_POST\fR
|
||||
callback operations. It contains the following information.
|
||||
.IP "\fIout\fR" 4
|
||||
.IP \fIout\fR 4
|
||||
.IX Item "out"
|
||||
The \fB\s-1BIO\s0\fR to stream through
|
||||
.IP "\fIndef_bio\fR" 4
|
||||
The \fBBIO\fR to stream through
|
||||
.IP \fIndef_bio\fR 4
|
||||
.IX Item "ndef_bio"
|
||||
The \fB\s-1BIO\s0\fR with filters appended
|
||||
.IP "\fIboundary\fR" 4
|
||||
The \fBBIO\fR with filters appended
|
||||
.IP \fIboundary\fR 4
|
||||
.IX Item "boundary"
|
||||
The streaming I/O boundary.
|
||||
.SH "RETURN VALUES"
|
||||
|
|
@ -354,15 +279,15 @@ require specific positive success values as noted above.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBASN1_item_new_ex\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBASN1_aux_const_cb()\fR callback and the \fB\s-1ASN1_OP_GET0_LIBCTX\s0\fR and
|
||||
\&\fB\s-1ASN1_OP_GET0_PROPQ\s0\fR operation types were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
The \fBASN1_aux_const_cb()\fR callback and the \fBASN1_OP_GET0_LIBCTX\fR and
|
||||
\&\fBASN1_OP_GET0_PROPQ\fR operation types were added in OpenSSL 3.0.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2021\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2021\-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_GENERATE_NCONF 3ossl"
|
||||
.TH ASN1_GENERATE_NCONF 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_GENERATE_NCONF 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_generate_nconf, ASN1_generate_v3 \- ASN1 string generation functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -148,24 +73,24 @@ ASN1_generate_nconf, ASN1_generate_v3 \- ASN1 string generation functions
|
|||
\& ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
|
||||
\& ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions generate the \s-1ASN1\s0 encoding of a string
|
||||
in an \fB\s-1ASN1_TYPE\s0\fR structure.
|
||||
These functions generate the ASN1 encoding of a string
|
||||
in an \fBASN1_TYPE\fR structure.
|
||||
.PP
|
||||
\&\fIstr\fR contains the string to encode. \fInconf\fR or \fIcnf\fR contains
|
||||
the optional configuration information where additional strings
|
||||
will be read from. \fInconf\fR will typically come from a config
|
||||
file whereas \fIcnf\fR is obtained from an \fBX509V3_CTX\fR structure,
|
||||
which will typically be used by X509 v3 certificate extension
|
||||
functions. \fIcnf\fR or \fInconf\fR can be set to \s-1NULL\s0 if no additional
|
||||
functions. \fIcnf\fR or \fInconf\fR can be set to NULL if no additional
|
||||
configuration will be used.
|
||||
.SH "GENERATION STRING FORMAT"
|
||||
.IX Header "GENERATION STRING FORMAT"
|
||||
The actual data encoded is determined by the string \fIstr\fR and
|
||||
the configuration information. The general format of the string
|
||||
is:
|
||||
.IP "[\fImodifier\fR,]\fItype\fR[:\fIvalue\fR]" 4
|
||||
.IP [\fImodifier\fR,]\fItype\fR[:\fIvalue\fR] 4
|
||||
.IX Item "[modifier,]type[:value]"
|
||||
.PP
|
||||
That is zero or more comma separated modifiers followed by a type
|
||||
|
|
@ -175,103 +100,103 @@ followed by an optional colon and a value. The formats of \fItype\fR,
|
|||
.IX Subsection "Supported Types"
|
||||
The supported types are listed below.
|
||||
Case is not significant in the type names.
|
||||
Unless otherwise specified only the \fB\s-1ASCII\s0\fR format is permissible.
|
||||
.IP "\fB\s-1BOOLEAN\s0\fR, \fB\s-1BOOL\s0\fR" 4
|
||||
Unless otherwise specified only the \fBASCII\fR format is permissible.
|
||||
.IP "\fBBOOLEAN\fR, \fBBOOL\fR" 4
|
||||
.IX Item "BOOLEAN, BOOL"
|
||||
This encodes a boolean type. The \fIvalue\fR string is mandatory and
|
||||
should be \fB\s-1TRUE\s0\fR or \fB\s-1FALSE\s0\fR. Additionally \fB\s-1TRUE\s0\fR, \fBtrue\fR, \fBY\fR,
|
||||
\&\fBy\fR, \fB\s-1YES\s0\fR, \fByes\fR, \fB\s-1FALSE\s0\fR, \fBfalse\fR, \fBN\fR, \fBn\fR, \fB\s-1NO\s0\fR and \fBno\fR
|
||||
should be \fBTRUE\fR or \fBFALSE\fR. Additionally \fBTRUE\fR, \fBtrue\fR, \fBY\fR,
|
||||
\&\fBy\fR, \fBYES\fR, \fByes\fR, \fBFALSE\fR, \fBfalse\fR, \fBN\fR, \fBn\fR, \fBNO\fR and \fBno\fR
|
||||
are acceptable.
|
||||
.IP "\fB\s-1NULL\s0\fR" 4
|
||||
.IP \fBNULL\fR 4
|
||||
.IX Item "NULL"
|
||||
Encode the \fB\s-1NULL\s0\fR type, the \fIvalue\fR string must not be present.
|
||||
.IP "\fB\s-1INTEGER\s0\fR, \fB\s-1INT\s0\fR" 4
|
||||
Encode the \fBNULL\fR type, the \fIvalue\fR string must not be present.
|
||||
.IP "\fBINTEGER\fR, \fBINT\fR" 4
|
||||
.IX Item "INTEGER, INT"
|
||||
Encodes an \s-1ASN1\s0 \fB\s-1INTEGER\s0\fR type. The \fIvalue\fR string represents
|
||||
Encodes an ASN1 \fBINTEGER\fR type. The \fIvalue\fR string represents
|
||||
the value of the integer, it can be prefaced by a minus sign and
|
||||
is normally interpreted as a decimal value unless the prefix \fB0x\fR
|
||||
is included.
|
||||
.IP "\fB\s-1ENUMERATED\s0\fR, \fB\s-1ENUM\s0\fR" 4
|
||||
.IP "\fBENUMERATED\fR, \fBENUM\fR" 4
|
||||
.IX Item "ENUMERATED, ENUM"
|
||||
Encodes the \s-1ASN1\s0 \fB\s-1ENUMERATED\s0\fR type, it is otherwise identical to
|
||||
\&\fB\s-1INTEGER\s0\fR.
|
||||
.IP "\fB\s-1OBJECT\s0\fR, \fB\s-1OID\s0\fR" 4
|
||||
Encodes the ASN1 \fBENUMERATED\fR type, it is otherwise identical to
|
||||
\&\fBINTEGER\fR.
|
||||
.IP "\fBOBJECT\fR, \fBOID\fR" 4
|
||||
.IX Item "OBJECT, OID"
|
||||
Encodes an \s-1ASN1\s0 \fB\s-1OBJECT IDENTIFIER\s0\fR, the \fIvalue\fR string can be
|
||||
Encodes an ASN1 \fBOBJECT IDENTIFIER\fR, the \fIvalue\fR string can be
|
||||
a short name, a long name or numerical format.
|
||||
.IP "\fB\s-1UTCTIME\s0\fR, \fB\s-1UTC\s0\fR" 4
|
||||
.IP "\fBUTCTIME\fR, \fBUTC\fR" 4
|
||||
.IX Item "UTCTIME, UTC"
|
||||
Encodes an \s-1ASN1\s0 \fBUTCTime\fR structure, the value should be in
|
||||
the format \fB\s-1YYMMDDHHMMSSZ\s0\fR.
|
||||
.IP "\fB\s-1GENERALIZEDTIME\s0\fR, \fB\s-1GENTIME\s0\fR" 4
|
||||
Encodes an ASN1 \fBUTCTime\fR structure, the value should be in
|
||||
the format \fBYYMMDDHHMMSSZ\fR.
|
||||
.IP "\fBGENERALIZEDTIME\fR, \fBGENTIME\fR" 4
|
||||
.IX Item "GENERALIZEDTIME, GENTIME"
|
||||
Encodes an \s-1ASN1\s0 \fBGeneralizedTime\fR structure, the value should be in
|
||||
the format \fB\s-1YYYYMMDDHHMMSSZ\s0\fR.
|
||||
.IP "\fB\s-1OCTETSTRING\s0\fR, \fB\s-1OCT\s0\fR" 4
|
||||
Encodes an ASN1 \fBGeneralizedTime\fR structure, the value should be in
|
||||
the format \fBYYYYMMDDHHMMSSZ\fR.
|
||||
.IP "\fBOCTETSTRING\fR, \fBOCT\fR" 4
|
||||
.IX Item "OCTETSTRING, OCT"
|
||||
Encodes an \s-1ASN1\s0 \fB\s-1OCTET STRING\s0\fR. \fIvalue\fR represents the contents
|
||||
of this structure, the format strings \fB\s-1ASCII\s0\fR and \fB\s-1HEX\s0\fR can be
|
||||
Encodes an ASN1 \fBOCTET STRING\fR. \fIvalue\fR represents the contents
|
||||
of this structure, the format strings \fBASCII\fR and \fBHEX\fR can be
|
||||
used to specify the format of \fIvalue\fR.
|
||||
.IP "\fB\s-1BITSTRING\s0\fR, \fB\s-1BITSTR\s0\fR" 4
|
||||
.IP "\fBBITSTRING\fR, \fBBITSTR\fR" 4
|
||||
.IX Item "BITSTRING, BITSTR"
|
||||
Encodes an \s-1ASN1\s0 \fB\s-1BIT STRING\s0\fR. \fIvalue\fR represents the contents
|
||||
of this structure, the format strings \fB\s-1ASCII\s0\fR, \fB\s-1HEX\s0\fR and \fB\s-1BITLIST\s0\fR
|
||||
Encodes an ASN1 \fBBIT STRING\fR. \fIvalue\fR represents the contents
|
||||
of this structure, the format strings \fBASCII\fR, \fBHEX\fR and \fBBITLIST\fR
|
||||
can be used to specify the format of \fIvalue\fR.
|
||||
.Sp
|
||||
If the format is anything other than \fB\s-1BITLIST\s0\fR the number of unused
|
||||
If the format is anything other than \fBBITLIST\fR the number of unused
|
||||
bits is set to zero.
|
||||
.IP "\fB\s-1UNIVERSALSTRING\s0\fR, \fB\s-1UNIV\s0\fR, \fB\s-1IA5\s0\fR, \fB\s-1IA5STRING\s0\fR, \fB\s-1UTF8\s0\fR, \fBUTF8String\fR, \fB\s-1BMP\s0\fR, \fB\s-1BMPSTRING\s0\fR, \fB\s-1VISIBLESTRING\s0\fR, \fB\s-1VISIBLE\s0\fR, \fB\s-1PRINTABLESTRING\s0\fR, \fB\s-1PRINTABLE\s0\fR, \fBT61\fR, \fBT61STRING\fR, \fB\s-1TELETEXSTRING\s0\fR, \fBGeneralString\fR, \fB\s-1NUMERICSTRING\s0\fR, \fB\s-1NUMERIC\s0\fR" 4
|
||||
.IP "\fBUNIVERSALSTRING\fR, \fBUNIV\fR, \fBIA5\fR, \fBIA5STRING\fR, \fBUTF8\fR, \fBUTF8String\fR, \fBBMP\fR, \fBBMPSTRING\fR, \fBVISIBLESTRING\fR, \fBVISIBLE\fR, \fBPRINTABLESTRING\fR, \fBPRINTABLE\fR, \fBT61\fR, \fBT61STRING\fR, \fBTELETEXSTRING\fR, \fBGeneralString\fR, \fBNUMERICSTRING\fR, \fBNUMERIC\fR" 4
|
||||
.IX Item "UNIVERSALSTRING, UNIV, IA5, IA5STRING, UTF8, UTF8String, BMP, BMPSTRING, VISIBLESTRING, VISIBLE, PRINTABLESTRING, PRINTABLE, T61, T61STRING, TELETEXSTRING, GeneralString, NUMERICSTRING, NUMERIC"
|
||||
These encode the corresponding string types. \fIvalue\fR represents the
|
||||
contents of this structure. The format can be \fB\s-1ASCII\s0\fR or \fB\s-1UTF8\s0\fR.
|
||||
.IP "\fB\s-1SEQUENCE\s0\fR, \fB\s-1SEQ\s0\fR, \fB\s-1SET\s0\fR" 4
|
||||
contents of this structure. The format can be \fBASCII\fR or \fBUTF8\fR.
|
||||
.IP "\fBSEQUENCE\fR, \fBSEQ\fR, \fBSET\fR" 4
|
||||
.IX Item "SEQUENCE, SEQ, SET"
|
||||
Formats the result as an \s-1ASN1\s0 \fB\s-1SEQUENCE\s0\fR or \fB\s-1SET\s0\fR type. \fIvalue\fR
|
||||
Formats the result as an ASN1 \fBSEQUENCE\fR or \fBSET\fR type. \fIvalue\fR
|
||||
should be a section name which will contain the contents. The
|
||||
field names in the section are ignored and the values are in the
|
||||
generated string format. If \fIvalue\fR is absent then an empty \s-1SEQUENCE\s0
|
||||
generated string format. If \fIvalue\fR is absent then an empty SEQUENCE
|
||||
will be encoded.
|
||||
.SS "Modifiers"
|
||||
.SS Modifiers
|
||||
.IX Subsection "Modifiers"
|
||||
Modifiers affect the following structure, they can be used to
|
||||
add \s-1EXPLICIT\s0 or \s-1IMPLICIT\s0 tagging, add wrappers or to change
|
||||
add EXPLICIT or IMPLICIT tagging, add wrappers or to change
|
||||
the string format of the final type and value. The supported
|
||||
formats are documented below.
|
||||
.IP "\fB\s-1EXPLICIT\s0\fR, \fB\s-1EXP\s0\fR" 4
|
||||
.IP "\fBEXPLICIT\fR, \fBEXP\fR" 4
|
||||
.IX Item "EXPLICIT, EXP"
|
||||
Add an explicit tag to the following structure. This string
|
||||
should be followed by a colon and the tag value to use as a
|
||||
decimal value.
|
||||
.Sp
|
||||
By following the number with \fBU\fR, \fBA\fR, \fBP\fR or \fBC\fR \s-1UNIVERSAL,
|
||||
APPLICATION, PRIVATE\s0 or \s-1CONTEXT SPECIFIC\s0 tagging can be used,
|
||||
the default is \s-1CONTEXT SPECIFIC.\s0
|
||||
.IP "\fB\s-1IMPLICIT\s0\fR, \fB\s-1IMP\s0\fR" 4
|
||||
By following the number with \fBU\fR, \fBA\fR, \fBP\fR or \fBC\fR UNIVERSAL,
|
||||
APPLICATION, PRIVATE or CONTEXT SPECIFIC tagging can be used,
|
||||
the default is CONTEXT SPECIFIC.
|
||||
.IP "\fBIMPLICIT\fR, \fBIMP\fR" 4
|
||||
.IX Item "IMPLICIT, IMP"
|
||||
This is the same as \fB\s-1EXPLICIT\s0\fR except \s-1IMPLICIT\s0 tagging is used
|
||||
This is the same as \fBEXPLICIT\fR except IMPLICIT tagging is used
|
||||
instead.
|
||||
.IP "\fB\s-1OCTWRAP\s0\fR, \fB\s-1SEQWRAP\s0\fR, \fB\s-1SETWRAP\s0\fR, \fB\s-1BITWRAP\s0\fR" 4
|
||||
.IP "\fBOCTWRAP\fR, \fBSEQWRAP\fR, \fBSETWRAP\fR, \fBBITWRAP\fR" 4
|
||||
.IX Item "OCTWRAP, SEQWRAP, SETWRAP, BITWRAP"
|
||||
The following structure is surrounded by an \s-1OCTET STRING,\s0 a \s-1SEQUENCE,\s0
|
||||
a \s-1SET\s0 or a \s-1BIT STRING\s0 respectively. For a \s-1BIT STRING\s0 the number of unused
|
||||
The following structure is surrounded by an OCTET STRING, a SEQUENCE,
|
||||
a SET or a BIT STRING respectively. For a BIT STRING the number of unused
|
||||
bits is set to zero.
|
||||
.IP "\fB\s-1FORMAT\s0\fR" 4
|
||||
.IP \fBFORMAT\fR 4
|
||||
.IX Item "FORMAT"
|
||||
This specifies the format of the ultimate value. It should be followed
|
||||
by a colon and one of the strings \fB\s-1ASCII\s0\fR, \fB\s-1UTF8\s0\fR, \fB\s-1HEX\s0\fR or \fB\s-1BITLIST\s0\fR.
|
||||
by a colon and one of the strings \fBASCII\fR, \fBUTF8\fR, \fBHEX\fR or \fBBITLIST\fR.
|
||||
.Sp
|
||||
If no format specifier is included then \fB\s-1ASCII\s0\fR is used. If \fB\s-1UTF8\s0\fR is
|
||||
specified then the value string must be a valid \fB\s-1UTF8\s0\fR string. For \fB\s-1HEX\s0\fR the
|
||||
output must be a set of hex digits. \fB\s-1BITLIST\s0\fR (which is only valid for a \s-1BIT
|
||||
STRING\s0) is a comma separated list of the indices of the set bits, all other
|
||||
If no format specifier is included then \fBASCII\fR is used. If \fBUTF8\fR is
|
||||
specified then the value string must be a valid \fBUTF8\fR string. For \fBHEX\fR the
|
||||
output must be a set of hex digits. \fBBITLIST\fR (which is only valid for a BIT
|
||||
STRING) is a comma separated list of the indices of the set bits, all other
|
||||
bits are zero.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_generate_nconf()\fR and \fBASN1_generate_v3()\fR return the encoded
|
||||
data as an \fB\s-1ASN1_TYPE\s0\fR structure or \s-1NULL\s0 if an error occurred.
|
||||
data as an \fBASN1_TYPE\fR structure or NULL if an error occurred.
|
||||
.PP
|
||||
The error codes that can be obtained by \fBERR_get_error\fR\|(3).
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
A simple IA5String:
|
||||
.PP
|
||||
|
|
@ -285,20 +210,20 @@ An IA5String explicitly tagged:
|
|||
\& EXPLICIT:0,IA5STRING:Hello World
|
||||
.Ve
|
||||
.PP
|
||||
An IA5String explicitly tagged using \s-1APPLICATION\s0 tagging:
|
||||
An IA5String explicitly tagged using APPLICATION tagging:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& EXPLICIT:0A,IA5STRING:Hello World
|
||||
.Ve
|
||||
.PP
|
||||
A \s-1BITSTRING\s0 with bits 1 and 5 set and all others zero:
|
||||
A BITSTRING with bits 1 and 5 set and all others zero:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& FORMAT:BITLIST,BITSTRING:1,5
|
||||
.Ve
|
||||
.PP
|
||||
A more complex example using a config file to produce a
|
||||
\&\s-1SEQUENCE\s0 consisting of a \s-1BOOL\s0 an \s-1OID\s0 and a UTF8String:
|
||||
SEQUENCE consisting of a BOOL an OID and a UTF8String:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& asn1 = SEQUENCE:seq_section
|
||||
|
|
@ -312,7 +237,7 @@ A more complex example using a config file to produce a
|
|||
.PP
|
||||
This example produces an RSAPrivateKey structure, this is the
|
||||
key contained in the file client.pem in all OpenSSL distributions
|
||||
(note: the field names such as 'coeff' are ignored and are present just
|
||||
(note: the field names such as \*(Aqcoeff\*(Aq are ignored and are present just
|
||||
for clarity):
|
||||
.PP
|
||||
.Vb 3
|
||||
|
|
@ -372,11 +297,11 @@ structure:
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2002\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_ITEM_D2I_BIO 3ossl"
|
||||
.TH ASN1_ITEM_D2I_BIO 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_ITEM_D2I_BIO 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_item_d2i_ex, ASN1_item_d2i, ASN1_item_d2i_bio_ex, ASN1_item_d2i_bio,
|
||||
ASN1_item_d2i_fp_ex, ASN1_item_d2i_fp, ASN1_item_i2d_mem_bio
|
||||
\&\- decode and encode DER\-encoded ASN.1 structures
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -163,58 +88,58 @@ ASN1_item_d2i_fp_ex, ASN1_item_d2i_fp, ASN1_item_i2d_mem_bio
|
|||
\&
|
||||
\& BIO *ASN1_item_i2d_mem_bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBASN1_item_d2i_ex()\fR decodes the contents of the data stored in \fI*in\fR of length
|
||||
\&\fIlen\fR which must be a DER-encoded \s-1ASN.1\s0 structure, using the \s-1ASN.1\s0 template
|
||||
\&\fIit\fR. It places the result in \fI*pval\fR unless \fIpval\fR is \s-1NULL.\s0 If \fI*pval\fR is
|
||||
non-NULL on entry then the \fB\s-1ASN1_VALUE\s0\fR present there will be reused. Otherwise
|
||||
a new \fB\s-1ASN1_VALUE\s0\fR will be allocated. If any algorithm fetches are required
|
||||
during the process then they will use the \fB\s-1OSSL_LIB_CTX\s0\fRprovided in the
|
||||
\&\fIlen\fR which must be a DER\-encoded ASN.1 structure, using the ASN.1 template
|
||||
\&\fIit\fR. It places the result in \fI*pval\fR unless \fIpval\fR is NULL. If \fI*pval\fR is
|
||||
non\-NULL on entry then the \fBASN1_VALUE\fR present there will be reused. Otherwise
|
||||
a new \fBASN1_VALUE\fR will be allocated. If any algorithm fetches are required
|
||||
during the process then they will use the \fBOSSL_LIB_CTX\fRprovided in the
|
||||
\&\fIlibctx\fR parameter and the property query string in \fIpropq\fR. See
|
||||
\&\*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in \fBcrypto\fR\|(7) for more information about algorithm fetching.
|
||||
"ALGORITHM FETCHING" in \fBcrypto\fR\|(7) for more information about algorithm fetching.
|
||||
On exit \fI*in\fR will be updated to point to the next byte in the buffer after the
|
||||
decoded structure.
|
||||
.PP
|
||||
\&\fBASN1_item_d2i()\fR is the same as \fBASN1_item_d2i_ex()\fR except that the default
|
||||
\&\s-1OSSL_LIB_CTX\s0 is used (i.e. \s-1NULL\s0) and with a \s-1NULL\s0 property query string.
|
||||
OSSL_LIB_CTX is used (i.e. NULL) and with a NULL property query string.
|
||||
.PP
|
||||
\&\fBASN1_item_d2i_bio_ex()\fR decodes the contents of its input \s-1BIO\s0 \fIin\fR,
|
||||
which must be a DER-encoded \s-1ASN.1\s0 structure, using the \s-1ASN.1\s0 template \fIit\fR
|
||||
and places the result in \fI*pval\fR unless \fIpval\fR is \s-1NULL.\s0
|
||||
If \fIin\fR is \s-1NULL\s0 it returns \s-1NULL,\s0 else a pointer to the parsed structure. If any
|
||||
\&\fBASN1_item_d2i_bio_ex()\fR decodes the contents of its input BIO \fIin\fR,
|
||||
which must be a DER\-encoded ASN.1 structure, using the ASN.1 template \fIit\fR
|
||||
and places the result in \fI*pval\fR unless \fIpval\fR is NULL.
|
||||
If \fIin\fR is NULL it returns NULL, else a pointer to the parsed structure. If any
|
||||
algorithm fetches are required during the process then they will use the
|
||||
\&\fB\s-1OSSL_LIB_CTX\s0\fR provided in the \fIlibctx\fR parameter and the property query
|
||||
string in \fIpropq\fR. See \*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in \fBcrypto\fR\|(7) for more information
|
||||
\&\fBOSSL_LIB_CTX\fR provided in the \fIlibctx\fR parameter and the property query
|
||||
string in \fIpropq\fR. See "ALGORITHM FETCHING" in \fBcrypto\fR\|(7) for more information
|
||||
about algorithm fetching.
|
||||
.PP
|
||||
\&\fBASN1_item_d2i_bio()\fR is the same as \fBASN1_item_d2i_bio_ex()\fR except that the
|
||||
default \fB\s-1OSSL_LIB_CTX\s0\fR is used (i.e. \s-1NULL\s0) and with a \s-1NULL\s0 property query
|
||||
default \fBOSSL_LIB_CTX\fR is used (i.e. NULL) and with a NULL property query
|
||||
string.
|
||||
.PP
|
||||
\&\fBASN1_item_d2i_fp_ex()\fR is the same as \fBASN1_item_d2i_bio_ex()\fR except that a \s-1FILE\s0
|
||||
pointer is provided instead of a \s-1BIO.\s0
|
||||
\&\fBASN1_item_d2i_fp_ex()\fR is the same as \fBASN1_item_d2i_bio_ex()\fR except that a FILE
|
||||
pointer is provided instead of a BIO.
|
||||
.PP
|
||||
\&\fBASN1_item_d2i_fp()\fR is the same as \fBASN1_item_d2i_fp_ex()\fR except that the
|
||||
default \fB\s-1OSSL_LIB_CTX\s0\fR is used (i.e. \s-1NULL\s0) and with a \s-1NULL\s0 property query
|
||||
default \fBOSSL_LIB_CTX\fR is used (i.e. NULL) and with a NULL property query
|
||||
string.
|
||||
.PP
|
||||
\&\fBASN1_item_i2d_mem_bio()\fR encodes the given \s-1ASN.1\s0 value \fIval\fR
|
||||
using the \s-1ASN.1\s0 template \fIit\fR and returns the result in a memory \s-1BIO.\s0
|
||||
\&\fBASN1_item_i2d_mem_bio()\fR encodes the given ASN.1 value \fIval\fR
|
||||
using the ASN.1 template \fIit\fR and returns the result in a memory BIO.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_item_d2i_bio()\fR returns a pointer to an \fB\s-1ASN1_VALUE\s0\fR or \s-1NULL.\s0
|
||||
\&\fBASN1_item_d2i_bio()\fR returns a pointer to an \fBASN1_VALUE\fR or NULL.
|
||||
.PP
|
||||
\&\fBASN1_item_i2d_mem_bio()\fR returns a pointer to a memory \s-1BIO\s0 or \s-1NULL\s0 on error.
|
||||
.SH "HISTORY"
|
||||
\&\fBASN1_item_i2d_mem_bio()\fR returns a pointer to a memory BIO or NULL on error.
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The functions \fBASN1_item_d2i_ex()\fR, \fBASN1_item_d2i_bio_ex()\fR, \fBASN1_item_d2i_fp_ex()\fR
|
||||
and \fBASN1_item_i2d_mem_bio()\fR were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_ITEM_NEW 3ossl"
|
||||
.TH ASN1_ITEM_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_ITEM_NEW 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_item_new_ex, ASN1_item_new
|
||||
\&\- create new ASN.1 values
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/asn1.h>
|
||||
|
|
@ -150,28 +75,28 @@ ASN1_item_new_ex, ASN1_item_new
|
|||
\& const char *propq);
|
||||
\& ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBASN1_item_new_ex()\fR creates a new \fB\s-1ASN1_VALUE\s0\fR structure based on the
|
||||
\&\fB\s-1ASN1_ITEM\s0\fR template given in the \fIit\fR parameter. If any algorithm fetches are
|
||||
required during the process then they will use the \fB\s-1OSSL_LIB_CTX\s0\fR provided in
|
||||
\&\fBASN1_item_new_ex()\fR creates a new \fBASN1_VALUE\fR structure based on the
|
||||
\&\fBASN1_ITEM\fR template given in the \fIit\fR parameter. If any algorithm fetches are
|
||||
required during the process then they will use the \fBOSSL_LIB_CTX\fR provided in
|
||||
the \fIlibctx\fR parameter and the property query string in \fIpropq\fR. See
|
||||
\&\*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in \fBcrypto\fR\|(7) for more information about algorithm fetching.
|
||||
"ALGORITHM FETCHING" in \fBcrypto\fR\|(7) for more information about algorithm fetching.
|
||||
.PP
|
||||
\&\fBASN1_item_new()\fR is the same as \fBASN1_item_new_ex()\fR except that the default
|
||||
\&\fB\s-1OSSL_LIB_CTX\s0\fR is used (i.e. \s-1NULL\s0) and with a \s-1NULL\s0 property query string.
|
||||
\&\fBOSSL_LIB_CTX\fR is used (i.e. NULL) and with a NULL property query string.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASN1_item_new_ex()\fR and \fBASN1_item_new()\fR return a pointer to the newly created
|
||||
\&\fB\s-1ASN1_VALUE\s0\fR or \s-1NULL\s0 on error.
|
||||
.SH "HISTORY"
|
||||
\&\fBASN1_VALUE\fR or NULL on error.
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The function \fBASN1_item_new_ex()\fR was added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_ITEM_SIGN 3ossl"
|
||||
.TH ASN1_ITEM_SIGN 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASN1_ITEM_SIGN 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASN1_item_sign, ASN1_item_sign_ex, ASN1_item_sign_ctx,
|
||||
ASN1_item_verify, ASN1_item_verify_ex, ASN1_item_verify_ctx \-
|
||||
ASN1 sign and verify
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/x509.h>
|
||||
|
|
@ -174,30 +99,30 @@ ASN1 sign and verify
|
|||
\& const ASN1_BIT_STRING *signature, const void *data,
|
||||
\& EVP_MD_CTX *ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBASN1_item_sign_ex()\fR is used to sign arbitrary \s-1ASN1\s0 data using a data object
|
||||
\&\fIdata\fR, the \s-1ASN.1\s0 structure \fIit\fR, private key \fIpkey\fR and message digest \fImd\fR.
|
||||
\&\fBASN1_item_sign_ex()\fR is used to sign arbitrary ASN1 data using a data object
|
||||
\&\fIdata\fR, the ASN.1 structure \fIit\fR, private key \fIpkey\fR and message digest \fImd\fR.
|
||||
The data that is signed is formed by taking the data object in \fIdata\fR and
|
||||
converting it to der format using the \s-1ASN.1\s0 structure \fIit\fR.
|
||||
converting it to der format using the ASN.1 structure \fIit\fR.
|
||||
The \fIdata\fR that will be signed, and a structure containing the signature may
|
||||
both have a copy of the \fBX509_ALGOR\fR. The \fBASN1_item_sign_ex()\fR function will
|
||||
write the correct \fBX509_ALGOR\fR to the structs based on the algorithms and
|
||||
parameters that have been set up. If one of \fIalgor1\fR or \fIalgor2\fR points to the
|
||||
\&\fBX509_ALGOR\fR of the \fIdata\fR to be signed, then that \fBX509_ALGOR\fR will first be
|
||||
written before the signature is generated.
|
||||
Examples of valid values that can be used by the \s-1ASN.1\s0 structure \fIit\fR are
|
||||
Examples of valid values that can be used by the ASN.1 structure \fIit\fR are
|
||||
ASN1_ITEM_rptr(X509_CINF), ASN1_ITEM_rptr(X509_REQ_INFO) and
|
||||
ASN1_ITEM_rptr(X509_CRL_INFO).
|
||||
The \fB\s-1OSSL_LIB_CTX\s0\fR specified in \fIlibctx\fR and the property query string
|
||||
The \fBOSSL_LIB_CTX\fR specified in \fIlibctx\fR and the property query string
|
||||
specified in \fIprops\fR are used when searching for algorithms in providers.
|
||||
The generated signature is set into \fIsignature\fR.
|
||||
The optional parameter \fIid\fR can be \s-1NULL,\s0 but can be set for special key types.
|
||||
The optional parameter \fIid\fR can be NULL, but can be set for special key types.
|
||||
See \fBEVP_PKEY_CTX_set1_id()\fR for further info. The output parameters <algor1> and
|
||||
\&\fIalgor2\fR are ignored if they are \s-1NULL.\s0
|
||||
\&\fIalgor2\fR are ignored if they are NULL.
|
||||
.PP
|
||||
\&\fBASN1_item_sign()\fR is similar to \fBASN1_item_sign_ex()\fR but uses default values of
|
||||
\&\s-1NULL\s0 for the \fIid\fR, \fIlibctx\fR and \fIpropq\fR.
|
||||
NULL for the \fIid\fR, \fIlibctx\fR and \fIpropq\fR.
|
||||
.PP
|
||||
\&\fBASN1_item_sign_ctx()\fR is similar to \fBASN1_item_sign()\fR but uses the parameters
|
||||
contained in digest context \fIctx\fR.
|
||||
|
|
@ -205,14 +130,14 @@ contained in digest context \fIctx\fR.
|
|||
\&\fBASN1_item_verify_ex()\fR is used to verify the signature \fIsignature\fR of internal
|
||||
data \fIdata\fR using the public key \fIpkey\fR and algorithm identifier \fIalg\fR.
|
||||
The data that is verified is formed by taking the data object in \fIdata\fR and
|
||||
converting it to der format using the \s-1ASN.1\s0 structure \fIit\fR.
|
||||
The \fB\s-1OSSL_LIB_CTX\s0\fR specified in \fIlibctx\fR and the property query string
|
||||
converting it to der format using the ASN.1 structure \fIit\fR.
|
||||
The \fBOSSL_LIB_CTX\fR specified in \fIlibctx\fR and the property query string
|
||||
specified in \fIprops\fR are used when searching for algorithms in providers.
|
||||
The optional parameter \fIid\fR can be \s-1NULL,\s0 but can be set for special key types.
|
||||
The optional parameter \fIid\fR can be NULL, but can be set for special key types.
|
||||
See \fBEVP_PKEY_CTX_set1_id()\fR for further info.
|
||||
.PP
|
||||
\&\fBASN1_item_verify()\fR is similar to \fBASN1_item_verify_ex()\fR but uses default values of
|
||||
\&\s-1NULL\s0 for the \fIid\fR, \fIlibctx\fR and \fIpropq\fR.
|
||||
NULL for the \fIid\fR, \fIlibctx\fR and \fIpropq\fR.
|
||||
.PP
|
||||
\&\fBASN1_item_verify_ctx()\fR is similar to \fBASN1_item_verify()\fR but uses the parameters
|
||||
contained in digest context \fIctx\fR.
|
||||
|
|
@ -223,12 +148,12 @@ zero for failure.
|
|||
.PP
|
||||
All verify functions return 1 if the signature is valid and 0 if the signature
|
||||
check fails. If the signature could not be checked at all because it was
|
||||
ill-formed or some other error occurred then \-1 is returned.
|
||||
.SH "EXAMPLES"
|
||||
ill\-formed or some other error occurred then \-1 is returned.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
In the following example a 'MyObject' object is signed using the key contained
|
||||
in an \s-1EVP_MD_CTX.\s0 The signature is written to MyObject.signature. The object is
|
||||
then output in \s-1DER\s0 format and then loaded back in and verified.
|
||||
In the following example a \*(AqMyObject\*(Aq object is signed using the key contained
|
||||
in an EVP_MD_CTX. The signature is written to MyObject.signature. The object is
|
||||
then output in DER format and then loaded back in and verified.
|
||||
.PP
|
||||
.Vb 2
|
||||
\& #include <openssl/x509.h>
|
||||
|
|
@ -344,14 +269,14 @@ then output in \s-1DER\s0 format and then loaded back in and verified.
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBX509_sign\fR\|(3),
|
||||
\&\fBX509_verify\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBASN1_item_sign_ex()\fR and \fBASN1_item_verify_ex()\fR were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2020\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASYNC_WAIT_CTX_NEW 3ossl"
|
||||
.TH ASYNC_WAIT_CTX_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASYNC_WAIT_CTX_NEW 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASYNC_WAIT_CTX_new, ASYNC_WAIT_CTX_free, ASYNC_WAIT_CTX_set_wait_fd,
|
||||
ASYNC_WAIT_CTX_get_fd, ASYNC_WAIT_CTX_get_all_fds,
|
||||
ASYNC_WAIT_CTX_get_changed_fds, ASYNC_WAIT_CTX_clear_fd,
|
||||
|
|
@ -147,7 +72,7 @@ ASYNC_WAIT_CTX_set_status, ASYNC_WAIT_CTX_get_status, ASYNC_callback_fn,
|
|||
ASYNC_STATUS_UNSUPPORTED, ASYNC_STATUS_ERR, ASYNC_STATUS_OK,
|
||||
ASYNC_STATUS_EAGAIN
|
||||
\&\- functions to manage waiting for asynchronous jobs to complete
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/async.h>
|
||||
|
|
@ -181,28 +106,28 @@ ASYNC_STATUS_EAGAIN
|
|||
\& int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status);
|
||||
\& int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
For an overview of how asynchronous operations are implemented in OpenSSL see
|
||||
\&\fBASYNC_start_job\fR\|(3). An \fB\s-1ASYNC_WAIT_CTX\s0\fR object represents an asynchronous
|
||||
\&\*(L"session\*(R", i.e. a related set of crypto operations. For example in \s-1SSL\s0 terms
|
||||
this would have a one-to-one correspondence with an \s-1SSL\s0 connection.
|
||||
\&\fBASYNC_start_job\fR\|(3). An \fBASYNC_WAIT_CTX\fR object represents an asynchronous
|
||||
"session", i.e. a related set of crypto operations. For example in SSL terms
|
||||
this would have a one\-to\-one correspondence with an SSL connection.
|
||||
.PP
|
||||
Application code must create an \fB\s-1ASYNC_WAIT_CTX\s0\fR using the \fBASYNC_WAIT_CTX_new()\fR
|
||||
Application code must create an \fBASYNC_WAIT_CTX\fR using the \fBASYNC_WAIT_CTX_new()\fR
|
||||
function prior to calling \fBASYNC_start_job()\fR (see \fBASYNC_start_job\fR\|(3)). When
|
||||
the job is started it is associated with the \fB\s-1ASYNC_WAIT_CTX\s0\fR for the duration
|
||||
of that job. An \fB\s-1ASYNC_WAIT_CTX\s0\fR should only be used for one \fB\s-1ASYNC_JOB\s0\fR at
|
||||
any one time, but can be reused after an \fB\s-1ASYNC_JOB\s0\fR has finished for a
|
||||
subsequent \fB\s-1ASYNC_JOB\s0\fR. When the session is complete (e.g. the \s-1SSL\s0 connection
|
||||
the job is started it is associated with the \fBASYNC_WAIT_CTX\fR for the duration
|
||||
of that job. An \fBASYNC_WAIT_CTX\fR should only be used for one \fBASYNC_JOB\fR at
|
||||
any one time, but can be reused after an \fBASYNC_JOB\fR has finished for a
|
||||
subsequent \fBASYNC_JOB\fR. When the session is complete (e.g. the SSL connection
|
||||
is closed), application code cleans up with \fBASYNC_WAIT_CTX_free()\fR.
|
||||
.PP
|
||||
\&\fB\s-1ASYNC_WAIT_CTX\s0\fRs can have \*(L"wait\*(R" file descriptors associated with them.
|
||||
\&\fBASYNC_WAIT_CTX\fRs can have "wait" file descriptors associated with them.
|
||||
Calling \fBASYNC_WAIT_CTX_get_all_fds()\fR and passing in a pointer to an
|
||||
\&\fB\s-1ASYNC_WAIT_CTX\s0\fR in the \fIctx\fR parameter will return the wait file descriptors
|
||||
\&\fBASYNC_WAIT_CTX\fR in the \fIctx\fR parameter will return the wait file descriptors
|
||||
associated with that job in \fI*fd\fR. The number of file descriptors returned will
|
||||
be stored in \fI*numfds\fR. It is the caller's responsibility to ensure that
|
||||
be stored in \fI*numfds\fR. It is the caller\*(Aqs responsibility to ensure that
|
||||
sufficient memory has been allocated in \fI*fd\fR to receive all the file
|
||||
descriptors. Calling \fBASYNC_WAIT_CTX_get_all_fds()\fR with a \s-1NULL\s0 \fIfd\fR value will
|
||||
descriptors. Calling \fBASYNC_WAIT_CTX_get_all_fds()\fR with a NULL \fIfd\fR value will
|
||||
return no file descriptors but will still populate \fI*numfds\fR. Therefore,
|
||||
application code is typically expected to call this function twice: once to get
|
||||
the number of fds, and then again when sufficient memory has been allocated. If
|
||||
|
|
@ -211,26 +136,26 @@ ever return one fd. If multiple asynchronous engines are being used then more
|
|||
could be returned.
|
||||
.PP
|
||||
The function \fBASYNC_WAIT_CTX_get_changed_fds()\fR can be used to detect if any fds
|
||||
have changed since the last call time \fBASYNC_start_job()\fR returned \fB\s-1ASYNC_PAUSE\s0\fR
|
||||
(or since the \fB\s-1ASYNC_WAIT_CTX\s0\fR was created if no \fB\s-1ASYNC_PAUSE\s0\fR result has
|
||||
have changed since the last call time \fBASYNC_start_job()\fR returned \fBASYNC_PAUSE\fR
|
||||
(or since the \fBASYNC_WAIT_CTX\fR was created if no \fBASYNC_PAUSE\fR result has
|
||||
been received). The \fInumaddfds\fR and \fInumdelfds\fR parameters will be populated
|
||||
with the number of fds added or deleted respectively. \fI*addfd\fR and \fI*delfd\fR
|
||||
will be populated with the list of added and deleted fds respectively. Similarly
|
||||
to \fBASYNC_WAIT_CTX_get_all_fds()\fR either of these can be \s-1NULL,\s0 but if they are not
|
||||
\&\s-1NULL\s0 then the caller is responsible for ensuring sufficient memory is allocated.
|
||||
to \fBASYNC_WAIT_CTX_get_all_fds()\fR either of these can be NULL, but if they are not
|
||||
NULL then the caller is responsible for ensuring sufficient memory is allocated.
|
||||
.PP
|
||||
Implementers of async aware code (e.g. engines) are encouraged to return a
|
||||
stable fd for the lifetime of the \fB\s-1ASYNC_WAIT_CTX\s0\fR in order to reduce the
|
||||
\&\*(L"churn\*(R" of regularly changing fds \- although no guarantees of this are provided
|
||||
stable fd for the lifetime of the \fBASYNC_WAIT_CTX\fR in order to reduce the
|
||||
"churn" of regularly changing fds \- although no guarantees of this are provided
|
||||
to applications.
|
||||
.PP
|
||||
Applications can wait for the file descriptor to be ready for \*(L"read\*(R" using a
|
||||
system function call such as select or poll (being ready for \*(L"read\*(R" indicates
|
||||
Applications can wait for the file descriptor to be ready for "read" using a
|
||||
system function call such as select or poll (being ready for "read" indicates
|
||||
that the job should be resumed). If no file descriptor is made available then an
|
||||
application will have to periodically \*(L"poll\*(R" the job by attempting to restart it
|
||||
application will have to periodically "poll" the job by attempting to restart it
|
||||
to see if it is ready to continue.
|
||||
.PP
|
||||
Async aware code (e.g. engines) can get the current \fB\s-1ASYNC_WAIT_CTX\s0\fR from the
|
||||
Async aware code (e.g. engines) can get the current \fBASYNC_WAIT_CTX\fR from the
|
||||
job via \fBASYNC_get_wait_ctx\fR\|(3) and provide a file descriptor to use for
|
||||
waiting on by calling \fBASYNC_WAIT_CTX_set_wait_fd()\fR. Typically this would be done
|
||||
by an engine immediately prior to calling \fBASYNC_pause_job()\fR and not by end user
|
||||
|
|
@ -238,29 +163,29 @@ code. An existing association with a file descriptor can be obtained using
|
|||
\&\fBASYNC_WAIT_CTX_get_fd()\fR and cleared using \fBASYNC_WAIT_CTX_clear_fd()\fR. Both of
|
||||
these functions requires a \fIkey\fR value which is unique to the async aware
|
||||
code. This could be any unique value but a good candidate might be the
|
||||
\&\fB\s-1ENGINE\s0 *\fR for the engine. The \fIcustom_data\fR parameter can be any value, and
|
||||
\&\fBENGINE *\fR for the engine. The \fIcustom_data\fR parameter can be any value, and
|
||||
will be returned in a subsequent call to \fBASYNC_WAIT_CTX_get_fd()\fR. The
|
||||
\&\fBASYNC_WAIT_CTX_set_wait_fd()\fR function also expects a pointer to a \*(L"cleanup\*(R"
|
||||
routine. This can be \s-1NULL\s0 but if provided will automatically get called when
|
||||
the \fB\s-1ASYNC_WAIT_CTX\s0\fR is freed, and gives the engine the opportunity to close
|
||||
the fd or any other resources. Note: The \*(L"cleanup\*(R" routine does not get called
|
||||
\&\fBASYNC_WAIT_CTX_set_wait_fd()\fR function also expects a pointer to a "cleanup"
|
||||
routine. This can be NULL but if provided will automatically get called when
|
||||
the \fBASYNC_WAIT_CTX\fR is freed, and gives the engine the opportunity to close
|
||||
the fd or any other resources. Note: The "cleanup" routine does not get called
|
||||
if the fd is cleared directly via a call to \fBASYNC_WAIT_CTX_clear_fd()\fR.
|
||||
.PP
|
||||
An example of typical usage might be an async capable engine. User code would
|
||||
initiate cryptographic operations. The engine would initiate those operations
|
||||
asynchronously and then call \fBASYNC_WAIT_CTX_set_wait_fd()\fR followed by
|
||||
\&\fBASYNC_pause_job()\fR to return control to the user code. The user code can then
|
||||
perform other tasks or wait for the job to be ready by calling \*(L"select\*(R" or other
|
||||
perform other tasks or wait for the job to be ready by calling "select" or other
|
||||
similar function on the wait file descriptor. The engine can signal to the user
|
||||
code that the job should be resumed by making the wait file descriptor
|
||||
\&\*(L"readable\*(R". Once resumed the engine should clear the wake signal on the wait
|
||||
"readable". Once resumed the engine should clear the wake signal on the wait
|
||||
file descriptor.
|
||||
.PP
|
||||
As well as a file descriptor, user code may also be notified via a callback. The
|
||||
callback and data pointers are stored within the \fB\s-1ASYNC_WAIT_CTX\s0\fR along with an
|
||||
callback and data pointers are stored within the \fBASYNC_WAIT_CTX\fR along with an
|
||||
additional status field that can be used for the notification of retries from an
|
||||
engine. This additional method can be used when the user thinks that a file
|
||||
descriptor is too costly in terms of \s-1CPU\s0 cycles or in some context where a file
|
||||
descriptor is too costly in terms of CPU cycles or in some context where a file
|
||||
descriptor is not appropriate.
|
||||
.PP
|
||||
\&\fBASYNC_WAIT_CTX_set_callback()\fR sets the callback and the callback argument. The
|
||||
|
|
@ -269,31 +194,31 @@ cryptography operation. It is a requirement that the callback function is small
|
|||
and nonblocking as it will be run in the context of a polling mechanism or an
|
||||
interrupt.
|
||||
.PP
|
||||
\&\fBASYNC_WAIT_CTX_get_callback()\fR returns the callback set in the \fB\s-1ASYNC_WAIT_CTX\s0\fR
|
||||
\&\fBASYNC_WAIT_CTX_get_callback()\fR returns the callback set in the \fBASYNC_WAIT_CTX\fR
|
||||
structure.
|
||||
.PP
|
||||
\&\fBASYNC_WAIT_CTX_set_status()\fR allows an engine to set the current engine status.
|
||||
The possible status values are the following:
|
||||
.IP "\fB\s-1ASYNC_STATUS_UNSUPPORTED\s0\fR" 4
|
||||
.IP \fBASYNC_STATUS_UNSUPPORTED\fR 4
|
||||
.IX Item "ASYNC_STATUS_UNSUPPORTED"
|
||||
The engine does not support the callback mechanism. This is the default value.
|
||||
The engine must call \fBASYNC_WAIT_CTX_set_status()\fR to set the status to some value
|
||||
other than \fB\s-1ASYNC_STATUS_UNSUPPORTED\s0\fR if it intends to enable the callback
|
||||
other than \fBASYNC_STATUS_UNSUPPORTED\fR if it intends to enable the callback
|
||||
mechanism.
|
||||
.IP "\fB\s-1ASYNC_STATUS_ERR\s0\fR" 4
|
||||
.IP \fBASYNC_STATUS_ERR\fR 4
|
||||
.IX Item "ASYNC_STATUS_ERR"
|
||||
The engine has a fatal problem with this request. The user code should clean up
|
||||
this session.
|
||||
.IP "\fB\s-1ASYNC_STATUS_OK\s0\fR" 4
|
||||
.IP \fBASYNC_STATUS_OK\fR 4
|
||||
.IX Item "ASYNC_STATUS_OK"
|
||||
The request has been successfully submitted.
|
||||
.IP "\fB\s-1ASYNC_STATUS_EAGAIN\s0\fR" 4
|
||||
.IP \fBASYNC_STATUS_EAGAIN\fR 4
|
||||
.IX Item "ASYNC_STATUS_EAGAIN"
|
||||
The engine has some problem which will be recovered soon, such as a buffer is
|
||||
full, so user code should resume the job.
|
||||
.PP
|
||||
\&\fBASYNC_WAIT_CTX_get_status()\fR allows user code to obtain the current status value.
|
||||
If the status is any value other than \fB\s-1ASYNC_STATUS_OK\s0\fR then the user code
|
||||
If the status is any value other than \fBASYNC_STATUS_OK\fR then the user code
|
||||
should not expect to receive a callback from the engine even if one has been
|
||||
set.
|
||||
.PP
|
||||
|
|
@ -305,28 +230,31 @@ that, user code can perform other tasks. When the hardware completes the
|
|||
operation, normally it is detected by a polling function or an interrupt, as the
|
||||
user code set a callback by calling \fBASYNC_WAIT_CTX_set_callback()\fR previously,
|
||||
then the registered callback will be called.
|
||||
.PP
|
||||
\&\fBASYNC_WAIT_CTX_free()\fR frees up a single \fBASYNC_WAIT_CTX\fR object.
|
||||
If the argument is NULL, nothing is done.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBASYNC_WAIT_CTX_new()\fR returns a pointer to the newly allocated \fB\s-1ASYNC_WAIT_CTX\s0\fR
|
||||
or \s-1NULL\s0 on error.
|
||||
\&\fBASYNC_WAIT_CTX_new()\fR returns a pointer to the newly allocated \fBASYNC_WAIT_CTX\fR
|
||||
or NULL on error.
|
||||
.PP
|
||||
ASYNC_WAIT_CTX_set_wait_fd, ASYNC_WAIT_CTX_get_fd, ASYNC_WAIT_CTX_get_all_fds,
|
||||
ASYNC_WAIT_CTX_get_changed_fds, ASYNC_WAIT_CTX_clear_fd,
|
||||
ASYNC_WAIT_CTX_set_callback, ASYNC_WAIT_CTX_get_callback and
|
||||
ASYNC_WAIT_CTX_set_status all return 1 on success or 0 on error.
|
||||
\&\fBASYNC_WAIT_CTX_get_status()\fR returns the engine status.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
On Windows platforms the \fI<openssl/async.h>\fR header is dependent on some
|
||||
of the types customarily made available by including \fI<windows.h>\fR. The
|
||||
application developer is likely to require control over when the latter
|
||||
is included, commonly as one of the first included headers. Therefore,
|
||||
it is defined as an application developer's responsibility to include
|
||||
it is defined as an application developer\*(Aqs responsibility to include
|
||||
\&\fI<windows.h>\fR prior to \fI<openssl/async.h>\fR.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBcrypto\fR\|(7), \fBASYNC_start_job\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBASYNC_WAIT_CTX_new()\fR, \fBASYNC_WAIT_CTX_free()\fR, \fBASYNC_WAIT_CTX_set_wait_fd()\fR,
|
||||
\&\fBASYNC_WAIT_CTX_get_fd()\fR, \fBASYNC_WAIT_CTX_get_all_fds()\fR,
|
||||
|
|
@ -336,11 +264,11 @@ were added in OpenSSL 1.1.0.
|
|||
\&\fBASYNC_WAIT_CTX_set_callback()\fR, \fBASYNC_WAIT_CTX_get_callback()\fR,
|
||||
\&\fBASYNC_WAIT_CTX_set_status()\fR, and \fBASYNC_WAIT_CTX_get_status()\fR
|
||||
were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2016\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2016\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASYNC_START_JOB 3ossl"
|
||||
.TH ASYNC_START_JOB 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH ASYNC_START_JOB 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
ASYNC_get_wait_ctx,
|
||||
ASYNC_init_thread, ASYNC_cleanup_thread, ASYNC_start_job, ASYNC_pause_job,
|
||||
ASYNC_get_current_job, ASYNC_block_pause, ASYNC_unblock_pause, ASYNC_is_capable
|
||||
\&\- asynchronous job management functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/async.h>
|
||||
|
|
@ -162,92 +87,92 @@ ASYNC_get_current_job, ASYNC_block_pause, ASYNC_unblock_pause, ASYNC_is_capable
|
|||
\&
|
||||
\& int ASYNC_is_capable(void);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
OpenSSL implements asynchronous capabilities through an \fB\s-1ASYNC_JOB\s0\fR. This
|
||||
OpenSSL implements asynchronous capabilities through an \fBASYNC_JOB\fR. This
|
||||
represents code that can be started and executes until some event occurs. At
|
||||
that point the code can be paused and control returns to user code until some
|
||||
subsequent event indicates that the job can be resumed.
|
||||
.PP
|
||||
The creation of an \fB\s-1ASYNC_JOB\s0\fR is a relatively expensive operation. Therefore,
|
||||
The creation of an \fBASYNC_JOB\fR is a relatively expensive operation. Therefore,
|
||||
for efficiency reasons, jobs can be created up front and reused many times. They
|
||||
are held in a pool until they are needed, at which point they are removed from
|
||||
the pool, used, and then returned to the pool when the job completes. If the
|
||||
user application is multi-threaded, then \fBASYNC_init_thread()\fR may be called for
|
||||
user application is multi\-threaded, then \fBASYNC_init_thread()\fR may be called for
|
||||
each thread that will initiate asynchronous jobs. Before
|
||||
user code exits per-thread resources need to be cleaned up. This will normally
|
||||
user code exits per\-thread resources need to be cleaned up. This will normally
|
||||
occur automatically (see \fBOPENSSL_init_crypto\fR\|(3)) but may be explicitly
|
||||
initiated by using \fBASYNC_cleanup_thread()\fR. No asynchronous jobs must be
|
||||
outstanding for the thread when \fBASYNC_cleanup_thread()\fR is called. Failing to
|
||||
ensure this will result in memory leaks.
|
||||
.PP
|
||||
The \fImax_size\fR argument limits the number of \fB\s-1ASYNC_JOB\s0\fRs that will be held in
|
||||
The \fImax_size\fR argument limits the number of \fBASYNC_JOB\fRs that will be held in
|
||||
the pool. If \fImax_size\fR is set to 0 then no upper limit is set. When an
|
||||
\&\fB\s-1ASYNC_JOB\s0\fR is needed but there are none available in the pool already then one
|
||||
will be automatically created, as long as the total of \fB\s-1ASYNC_JOB\s0\fRs managed by
|
||||
\&\fBASYNC_JOB\fR is needed but there are none available in the pool already then one
|
||||
will be automatically created, as long as the total of \fBASYNC_JOB\fRs managed by
|
||||
the pool does not exceed \fImax_size\fR. When the pool is first initialised
|
||||
\&\fIinit_size\fR \fB\s-1ASYNC_JOB\s0\fRs will be created immediately. If \fBASYNC_init_thread()\fR
|
||||
\&\fIinit_size\fR \fBASYNC_JOB\fRs will be created immediately. If \fBASYNC_init_thread()\fR
|
||||
is not called before the pool is first used then it will be called automatically
|
||||
with a \fImax_size\fR of 0 (no upper limit) and an \fIinit_size\fR of 0 (no
|
||||
\&\fB\s-1ASYNC_JOB\s0\fRs created up front).
|
||||
\&\fBASYNC_JOB\fRs created up front).
|
||||
.PP
|
||||
An asynchronous job is started by calling the \fBASYNC_start_job()\fR function.
|
||||
Initially \fI*job\fR should be \s-1NULL.\s0 \fIctx\fR should point to an \fB\s-1ASYNC_WAIT_CTX\s0\fR
|
||||
Initially \fI*job\fR should be NULL. \fIctx\fR should point to an \fBASYNC_WAIT_CTX\fR
|
||||
object created through the \fBASYNC_WAIT_CTX_new\fR\|(3) function. \fIret\fR should
|
||||
point to a location where the return value of the asynchronous function should
|
||||
be stored on completion of the job. \fIfunc\fR represents the function that should
|
||||
be started asynchronously. The data pointed to by \fIargs\fR and of size \fIsize\fR
|
||||
will be copied and then passed as an argument to \fIfunc\fR when the job starts.
|
||||
ASYNC_start_job will return one of the following values:
|
||||
.IP "\fB\s-1ASYNC_ERR\s0\fR" 4
|
||||
.IP \fBASYNC_ERR\fR 4
|
||||
.IX Item "ASYNC_ERR"
|
||||
An error occurred trying to start the job. Check the OpenSSL error queue (e.g.
|
||||
see \fBERR_print_errors\fR\|(3)) for more details.
|
||||
.IP "\fB\s-1ASYNC_NO_JOBS\s0\fR" 4
|
||||
.IP \fBASYNC_NO_JOBS\fR 4
|
||||
.IX Item "ASYNC_NO_JOBS"
|
||||
There are no jobs currently available in the pool. This call can be retried
|
||||
again at a later time.
|
||||
.IP "\fB\s-1ASYNC_PAUSE\s0\fR" 4
|
||||
.IP \fBASYNC_PAUSE\fR 4
|
||||
.IX Item "ASYNC_PAUSE"
|
||||
The job was successfully started but was \*(L"paused\*(R" before it completed (see
|
||||
The job was successfully started but was "paused" before it completed (see
|
||||
\&\fBASYNC_pause_job()\fR below). A handle to the job is placed in \fI*job\fR. Other work
|
||||
can be performed (if desired) and the job restarted at a later time. To restart
|
||||
a job call \fBASYNC_start_job()\fR again passing the job handle in \fI*job\fR. The
|
||||
\&\fIfunc\fR, \fIargs\fR and \fIsize\fR parameters will be ignored when restarting a job.
|
||||
When restarting a job \fBASYNC_start_job()\fR \fBmust\fR be called from the same thread
|
||||
that the job was originally started from.
|
||||
.IP "\fB\s-1ASYNC_FINISH\s0\fR" 4
|
||||
.IP \fBASYNC_FINISH\fR 4
|
||||
.IX Item "ASYNC_FINISH"
|
||||
The job completed. \fI*job\fR will be \s-1NULL\s0 and the return value from \fIfunc\fR will
|
||||
The job completed. \fI*job\fR will be NULL and the return value from \fIfunc\fR will
|
||||
be placed in \fI*ret\fR.
|
||||
.PP
|
||||
At any one time there can be a maximum of one job actively running per thread
|
||||
(you can have many that are paused). \fBASYNC_get_current_job()\fR can be used to get
|
||||
a pointer to the currently executing \fB\s-1ASYNC_JOB\s0\fR. If no job is currently
|
||||
executing then this will return \s-1NULL.\s0
|
||||
a pointer to the currently executing \fBASYNC_JOB\fR. If no job is currently
|
||||
executing then this will return NULL.
|
||||
.PP
|
||||
If executing within the context of a job (i.e. having been called directly or
|
||||
indirectly by the function \*(L"func\*(R" passed as an argument to \fBASYNC_start_job()\fR)
|
||||
indirectly by the function "func" passed as an argument to \fBASYNC_start_job()\fR)
|
||||
then \fBASYNC_pause_job()\fR will immediately return control to the calling
|
||||
application with \fB\s-1ASYNC_PAUSE\s0\fR returned from the \fBASYNC_start_job()\fR call. A
|
||||
subsequent call to ASYNC_start_job passing in the relevant \fB\s-1ASYNC_JOB\s0\fR in the
|
||||
application with \fBASYNC_PAUSE\fR returned from the \fBASYNC_start_job()\fR call. A
|
||||
subsequent call to ASYNC_start_job passing in the relevant \fBASYNC_JOB\fR in the
|
||||
\&\fI*job\fR parameter will resume execution from the \fBASYNC_pause_job()\fR call. If
|
||||
\&\fBASYNC_pause_job()\fR is called whilst not within the context of a job then no
|
||||
action is taken and \fBASYNC_pause_job()\fR returns immediately.
|
||||
.PP
|
||||
\&\fBASYNC_get_wait_ctx()\fR can be used to get a pointer to the \fB\s-1ASYNC_WAIT_CTX\s0\fR
|
||||
for the \fIjob\fR. \fB\s-1ASYNC_WAIT_CTX\s0\fRs contain two different ways to notify
|
||||
applications that a job is ready to be resumed. One is a \*(L"wait\*(R" file
|
||||
descriptor, and the other is a \*(L"callback\*(R" mechanism.
|
||||
\&\fBASYNC_get_wait_ctx()\fR can be used to get a pointer to the \fBASYNC_WAIT_CTX\fR
|
||||
for the \fIjob\fR. \fBASYNC_WAIT_CTX\fRs contain two different ways to notify
|
||||
applications that a job is ready to be resumed. One is a "wait" file
|
||||
descriptor, and the other is a "callback" mechanism.
|
||||
.PP
|
||||
The \*(L"wait\*(R" file descriptor associated with \fB\s-1ASYNC_WAIT_CTX\s0\fR is used for
|
||||
applications to wait for the file descriptor to be ready for \*(L"read\*(R" using a
|
||||
system function call such as select or poll (being ready for \*(L"read\*(R" indicates
|
||||
The "wait" file descriptor associated with \fBASYNC_WAIT_CTX\fR is used for
|
||||
applications to wait for the file descriptor to be ready for "read" using a
|
||||
system function call such as select or poll (being ready for "read" indicates
|
||||
that the job should be resumed). If no file descriptor is made available then
|
||||
an application will have to periodically \*(L"poll\*(R" the job by attempting to restart
|
||||
an application will have to periodically "poll" the job by attempting to restart
|
||||
it to see if it is ready to continue.
|
||||
.PP
|
||||
\&\fB\s-1ASYNC_WAIT_CTX\s0\fRs also have a \*(L"callback\*(R" mechanism to notify applications. The
|
||||
\&\fBASYNC_WAIT_CTX\fRs also have a "callback" mechanism to notify applications. The
|
||||
callback is set by an application, and it will be automatically called when an
|
||||
engine completes a cryptography operation, so that the application can resume
|
||||
the paused work flow without polling. An engine could be written to look whether
|
||||
|
|
@ -261,12 +186,12 @@ The \fBASYNC_block_pause()\fR function will prevent the currently active job fro
|
|||
pausing. The block will remain in place until a subsequent call to
|
||||
\&\fBASYNC_unblock_pause()\fR. These functions can be nested, e.g. if you call
|
||||
\&\fBASYNC_block_pause()\fR twice then you must call \fBASYNC_unblock_pause()\fR twice in
|
||||
order to re-enable pausing. If these functions are called while there is no
|
||||
order to re\-enable pausing. If these functions are called while there is no
|
||||
currently active job then they have no effect. This functionality can be useful
|
||||
to avoid deadlock scenarios. For example during the execution of an \fB\s-1ASYNC_JOB\s0\fR
|
||||
to avoid deadlock scenarios. For example during the execution of an \fBASYNC_JOB\fR
|
||||
an application acquires a lock. It then calls some cryptographic function which
|
||||
invokes \fBASYNC_pause_job()\fR. This returns control back to the code that created
|
||||
the \fB\s-1ASYNC_JOB\s0\fR. If that code then attempts to acquire the same lock before
|
||||
the \fBASYNC_JOB\fR. If that code then attempts to acquire the same lock before
|
||||
resuming the original job then a deadlock can occur. By calling
|
||||
\&\fBASYNC_block_pause()\fR immediately after acquiring the lock and
|
||||
\&\fBASYNC_unblock_pause()\fR immediately before releasing it then this situation cannot
|
||||
|
|
@ -278,29 +203,29 @@ can be used to detect whether the current platform is async capable or not.
|
|||
.IX Header "RETURN VALUES"
|
||||
ASYNC_init_thread returns 1 on success or 0 otherwise.
|
||||
.PP
|
||||
ASYNC_start_job returns one of \fB\s-1ASYNC_ERR\s0\fR, \fB\s-1ASYNC_NO_JOBS\s0\fR, \fB\s-1ASYNC_PAUSE\s0\fR or
|
||||
\&\fB\s-1ASYNC_FINISH\s0\fR as described above.
|
||||
ASYNC_start_job returns one of \fBASYNC_ERR\fR, \fBASYNC_NO_JOBS\fR, \fBASYNC_PAUSE\fR or
|
||||
\&\fBASYNC_FINISH\fR as described above.
|
||||
.PP
|
||||
ASYNC_pause_job returns 0 if an error occurred or 1 on success. If called when
|
||||
not within the context of an \fB\s-1ASYNC_JOB\s0\fR then this is counted as success so 1
|
||||
not within the context of an \fBASYNC_JOB\fR then this is counted as success so 1
|
||||
is returned.
|
||||
.PP
|
||||
ASYNC_get_current_job returns a pointer to the currently executing \fB\s-1ASYNC_JOB\s0\fR
|
||||
or \s-1NULL\s0 if not within the context of a job.
|
||||
ASYNC_get_current_job returns a pointer to the currently executing \fBASYNC_JOB\fR
|
||||
or NULL if not within the context of a job.
|
||||
.PP
|
||||
\&\fBASYNC_get_wait_ctx()\fR returns a pointer to the \fB\s-1ASYNC_WAIT_CTX\s0\fR for the job.
|
||||
\&\fBASYNC_get_wait_ctx()\fR returns a pointer to the \fBASYNC_WAIT_CTX\fR for the job.
|
||||
.PP
|
||||
\&\fBASYNC_is_capable()\fR returns 1 if the current platform is async capable or 0
|
||||
otherwise.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
On Windows platforms the \fI<openssl/async.h>\fR header is dependent on some
|
||||
of the types customarily made available by including \fI<windows.h>\fR. The
|
||||
application developer is likely to require control over when the latter
|
||||
is included, commonly as one of the first included headers. Therefore,
|
||||
it is defined as an application developer's responsibility to include
|
||||
it is defined as an application developer\*(Aqs responsibility to include
|
||||
\&\fI<windows.h>\fR prior to \fI<openssl/async.h>\fR.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
The following example demonstrates how to use most of the core async APIs:
|
||||
.PP
|
||||
|
|
@ -444,17 +369,17 @@ The expected output from executing the above example program is:
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBcrypto\fR\|(7), \fBERR_print_errors\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
ASYNC_init_thread, ASYNC_cleanup_thread,
|
||||
ASYNC_start_job, ASYNC_pause_job, ASYNC_get_current_job, \fBASYNC_get_wait_ctx()\fR,
|
||||
\&\fBASYNC_block_pause()\fR, \fBASYNC_unblock_pause()\fR and \fBASYNC_is_capable()\fR were first
|
||||
added in OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2015\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,86 +53,27 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BF_ENCRYPT 3ossl"
|
||||
.TH BF_ENCRYPT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BF_ENCRYPT 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BF_set_key, BF_encrypt, BF_decrypt, BF_ecb_encrypt, BF_cbc_encrypt,
|
||||
BF_cfb64_encrypt, BF_ofb64_encrypt, BF_options \- Blowfish encryption
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/blowfish.h>
|
||||
.Ve
|
||||
.PP
|
||||
The following functions have been deprecated since OpenSSL 3.0, and can be
|
||||
hidden entirely by defining \fB\s-1OPENSSL_API_COMPAT\s0\fR with a suitable version value,
|
||||
hidden entirely by defining \fBOPENSSL_API_COMPAT\fR with a suitable version value,
|
||||
see \fBopenssl_user_macros\fR\|(7):
|
||||
.PP
|
||||
.Vb 1
|
||||
|
|
@ -170,7 +95,7 @@ see \fBopenssl_user_macros\fR\|(7):
|
|||
\& void BF_encrypt(BF_LONG *data, const BF_KEY *key);
|
||||
\& void BF_decrypt(BF_LONG *data, const BF_KEY *key);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
All of the functions described on this page are deprecated. Applications should
|
||||
instead use \fBEVP_EncryptInit_ex\fR\|(3), \fBEVP_EncryptUpdate\fR\|(3) and
|
||||
|
|
@ -182,20 +107,20 @@ by Counterpane (see http://www.counterpane.com/blowfish.html ).
|
|||
Blowfish is a block cipher that operates on 64 bit (8 byte) blocks of data.
|
||||
It uses a variable size key, but typically, 128 bit (16 byte) keys are
|
||||
considered good for strong encryption. Blowfish can be used in the same
|
||||
modes as \s-1DES\s0 (see \fBdes_modes\fR\|(7)). Blowfish is currently one
|
||||
of the faster block ciphers. It is quite a bit faster than \s-1DES,\s0 and much
|
||||
faster than \s-1IDEA\s0 or \s-1RC2.\s0
|
||||
modes as DES (see \fBdes_modes\fR\|(7)). Blowfish is currently one
|
||||
of the faster block ciphers. It is quite a bit faster than DES, and much
|
||||
faster than IDEA or RC2.
|
||||
.PP
|
||||
Blowfish consists of a key setup phase and the actual encryption or decryption
|
||||
phase.
|
||||
.PP
|
||||
\&\fBBF_set_key()\fR sets up the \fB\s-1BF_KEY\s0\fR \fBkey\fR using the \fBlen\fR bytes long key
|
||||
\&\fBBF_set_key()\fR sets up the \fBBF_KEY\fR \fBkey\fR using the \fBlen\fR bytes long key
|
||||
at \fBdata\fR.
|
||||
.PP
|
||||
\&\fBBF_ecb_encrypt()\fR is the basic Blowfish encryption and decryption function.
|
||||
It encrypts or decrypts the first 64 bits of \fBin\fR using the key \fBkey\fR,
|
||||
putting the result in \fBout\fR. \fBenc\fR decides if encryption (\fB\s-1BF_ENCRYPT\s0\fR)
|
||||
or decryption (\fB\s-1BF_DECRYPT\s0\fR) shall be performed. The vector pointed at by
|
||||
putting the result in \fBout\fR. \fBenc\fR decides if encryption (\fBBF_ENCRYPT\fR)
|
||||
or decryption (\fBBF_DECRYPT\fR) shall be performed. The vector pointed at by
|
||||
\&\fBin\fR and \fBout\fR must be 64 bits in length, no less. If they are larger,
|
||||
everything after the first 64 bits is ignored.
|
||||
.PP
|
||||
|
|
@ -203,8 +128,8 @@ The mode functions \fBBF_cbc_encrypt()\fR, \fBBF_cfb64_encrypt()\fR and \fBBF_of
|
|||
all operate on variable length data. They all take an initialization vector
|
||||
\&\fBivec\fR which needs to be passed along into the next call of the same function
|
||||
for the same message. \fBivec\fR may be initialized with anything, but the
|
||||
recipient needs to know what it was initialized with, or it won't be able
|
||||
to decrypt. Some programs and protocols simplify this, like \s-1SSH,\s0 where
|
||||
recipient needs to know what it was initialized with, or it won\*(Aqt be able
|
||||
to decrypt. Some programs and protocols simplify this, like SSH, where
|
||||
\&\fBivec\fR is simply initialized to zero.
|
||||
\&\fBBF_cbc_encrypt()\fR operates on data that is a multiple of 8 bytes long, while
|
||||
\&\fBBF_cfb64_encrypt()\fR and \fBBF_ofb64_encrypt()\fR are used to encrypt a variable
|
||||
|
|
@ -216,32 +141,32 @@ to zero when \fBivec\fR is initialized.
|
|||
.PP
|
||||
\&\fBBF_cbc_encrypt()\fR is the Cipher Block Chaining function for Blowfish. It
|
||||
encrypts or decrypts the 64 bits chunks of \fBin\fR using the key \fBschedule\fR,
|
||||
putting the result in \fBout\fR. \fBenc\fR decides if encryption (\s-1BF_ENCRYPT\s0) or
|
||||
decryption (\s-1BF_DECRYPT\s0) shall be performed. \fBivec\fR must point at an 8 byte
|
||||
putting the result in \fBout\fR. \fBenc\fR decides if encryption (BF_ENCRYPT) or
|
||||
decryption (BF_DECRYPT) shall be performed. \fBivec\fR must point at an 8 byte
|
||||
long initialization vector.
|
||||
.PP
|
||||
\&\fBBF_cfb64_encrypt()\fR is the \s-1CFB\s0 mode for Blowfish with 64 bit feedback.
|
||||
\&\fBBF_cfb64_encrypt()\fR is the CFB mode for Blowfish with 64 bit feedback.
|
||||
It encrypts or decrypts the bytes in \fBin\fR using the key \fBschedule\fR,
|
||||
putting the result in \fBout\fR. \fBenc\fR decides if encryption (\fB\s-1BF_ENCRYPT\s0\fR)
|
||||
or decryption (\fB\s-1BF_DECRYPT\s0\fR) shall be performed. \fBivec\fR must point at an
|
||||
putting the result in \fBout\fR. \fBenc\fR decides if encryption (\fBBF_ENCRYPT\fR)
|
||||
or decryption (\fBBF_DECRYPT\fR) shall be performed. \fBivec\fR must point at an
|
||||
8 byte long initialization vector. \fBnum\fR must point at an integer which must
|
||||
be initially zero.
|
||||
.PP
|
||||
\&\fBBF_ofb64_encrypt()\fR is the \s-1OFB\s0 mode for Blowfish with 64 bit feedback.
|
||||
\&\fBBF_ofb64_encrypt()\fR is the OFB mode for Blowfish with 64 bit feedback.
|
||||
It uses the same parameters as \fBBF_cfb64_encrypt()\fR, which must be initialized
|
||||
the same way.
|
||||
.PP
|
||||
\&\fBBF_encrypt()\fR and \fBBF_decrypt()\fR are the lowest level functions for Blowfish
|
||||
encryption. They encrypt/decrypt the first 64 bits of the vector pointed by
|
||||
\&\fBdata\fR, using the key \fBkey\fR. These functions should not be used unless you
|
||||
implement 'modes' of Blowfish. The alternative is to use \fBBF_ecb_encrypt()\fR.
|
||||
implement \*(Aqmodes\*(Aq of Blowfish. The alternative is to use \fBBF_ecb_encrypt()\fR.
|
||||
If you still want to use these functions, you should be aware that they take
|
||||
each 32\-bit chunk in host-byte order, which is little-endian on little-endian
|
||||
platforms and big-endian on big-endian ones.
|
||||
each 32\-bit chunk in host\-byte order, which is little\-endian on little\-endian
|
||||
platforms and big\-endian on big\-endian ones.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
None of the functions presented here return any value.
|
||||
.SH "NOTE"
|
||||
.SH NOTE
|
||||
.IX Header "NOTE"
|
||||
Applications should use the higher level functions
|
||||
\&\fBEVP_EncryptInit\fR\|(3) etc. instead of calling these
|
||||
|
|
@ -250,14 +175,14 @@ functions directly.
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBEVP_EncryptInit\fR\|(3),
|
||||
\&\fBdes_modes\fR\|(7)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_ADDR 3ossl"
|
||||
.TH BIO_ADDR 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_ADDR 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_ADDR, BIO_ADDR_new, BIO_ADDR_clear, BIO_ADDR_free, BIO_ADDR_rawmake,
|
||||
BIO_ADDR_family, BIO_ADDR_rawaddress, BIO_ADDR_rawport,
|
||||
BIO_ADDR_hostname_string, BIO_ADDR_service_string,
|
||||
BIO_ADDR_path_string \- BIO_ADDR routines
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include <sys/types.h>
|
||||
|
|
@ -163,94 +88,95 @@ BIO_ADDR_path_string \- BIO_ADDR routines
|
|||
\& char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
|
||||
\& char *BIO_ADDR_path_string(const BIO_ADDR *ap);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fB\s-1BIO_ADDR\s0\fR type is a wrapper around all types of socket
|
||||
The \fBBIO_ADDR\fR type is a wrapper around all types of socket
|
||||
addresses that OpenSSL deals with, currently transparently
|
||||
supporting \s-1AF_INET, AF_INET6\s0 and \s-1AF_UNIX\s0 according to what's
|
||||
supporting AF_INET, AF_INET6 and AF_UNIX according to what\*(Aqs
|
||||
available on the platform at hand.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_new()\fR creates a new unfilled \fB\s-1BIO_ADDR\s0\fR, to be used
|
||||
\&\fBBIO_ADDR_new()\fR creates a new unfilled \fBBIO_ADDR\fR, to be used
|
||||
with routines that will fill it with information, such as
|
||||
\&\fBBIO_accept_ex()\fR.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_free()\fR frees a \fB\s-1BIO_ADDR\s0\fR created with \fBBIO_ADDR_new()\fR.
|
||||
\&\fBBIO_ADDR_free()\fR frees a \fBBIO_ADDR\fR created with \fBBIO_ADDR_new()\fR.
|
||||
If the argument is NULL, nothing is done.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_clear()\fR clears any data held within the provided \fB\s-1BIO_ADDR\s0\fR and sets
|
||||
\&\fBBIO_ADDR_clear()\fR clears any data held within the provided \fBBIO_ADDR\fR and sets
|
||||
it back to an uninitialised state.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_rawmake()\fR takes a protocol \fBfamily\fR, a byte array of
|
||||
size \fBwherelen\fR with an address in network byte order pointed at
|
||||
by \fBwhere\fR and a port number in network byte order in \fBport\fR (except
|
||||
for the \fB\s-1AF_UNIX\s0\fR protocol family, where \fBport\fR is meaningless and
|
||||
therefore ignored) and populates the given \fB\s-1BIO_ADDR\s0\fR with them.
|
||||
In case this creates a \fB\s-1AF_UNIX\s0\fR \fB\s-1BIO_ADDR\s0\fR, \fBwherelen\fR is expected
|
||||
for the \fBAF_UNIX\fR protocol family, where \fBport\fR is meaningless and
|
||||
therefore ignored) and populates the given \fBBIO_ADDR\fR with them.
|
||||
In case this creates a \fBAF_UNIX\fR \fBBIO_ADDR\fR, \fBwherelen\fR is expected
|
||||
to be the length of the path string (not including the terminating
|
||||
\&\s-1NUL,\s0 such as the result of a call to \fBstrlen()\fR).
|
||||
Read on about the addresses in \*(L"\s-1RAW ADDRESSES\*(R"\s0 below.
|
||||
NUL, such as the result of a call to \fBstrlen()\fR).
|
||||
Read on about the addresses in "RAW ADDRESSES" below.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_family()\fR returns the protocol family of the given
|
||||
\&\fB\s-1BIO_ADDR\s0\fR. The possible non-error results are one of the
|
||||
constants \s-1AF_INET, AF_INET6\s0 and \s-1AF_UNIX.\s0 It will also return \s-1AF_UNSPEC\s0 if the
|
||||
\&\s-1BIO_ADDR\s0 has not been initialised.
|
||||
\&\fBBIO_ADDR\fR. The possible non\-error results are one of the
|
||||
constants AF_INET, AF_INET6 and AF_UNIX. It will also return AF_UNSPEC if the
|
||||
BIO_ADDR has not been initialised.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_rawaddress()\fR will write the raw address of the given
|
||||
\&\fB\s-1BIO_ADDR\s0\fR in the area pointed at by \fBp\fR if \fBp\fR is non-NULL,
|
||||
\&\fBBIO_ADDR\fR in the area pointed at by \fBp\fR if \fBp\fR is non\-NULL,
|
||||
and will set \fB*l\fR to be the amount of bytes the raw address
|
||||
takes up if \fBl\fR is non-NULL.
|
||||
takes up if \fBl\fR is non\-NULL.
|
||||
A technique to only find out the size of the address is a call
|
||||
with \fBp\fR set to \fB\s-1NULL\s0\fR. The raw address will be in network byte
|
||||
with \fBp\fR set to \fBNULL\fR. The raw address will be in network byte
|
||||
order, most significant byte first.
|
||||
In case this is a \fB\s-1AF_UNIX\s0\fR \fB\s-1BIO_ADDR\s0\fR, \fBl\fR gets the length of the
|
||||
path string (not including the terminating \s-1NUL,\s0 such as the result of
|
||||
In case this is a \fBAF_UNIX\fR \fBBIO_ADDR\fR, \fBl\fR gets the length of the
|
||||
path string (not including the terminating NUL, such as the result of
|
||||
a call to \fBstrlen()\fR).
|
||||
Read on about the addresses in \*(L"\s-1RAW ADDRESSES\*(R"\s0 below.
|
||||
Read on about the addresses in "RAW ADDRESSES" below.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_rawport()\fR returns the raw port of the given \fB\s-1BIO_ADDR\s0\fR.
|
||||
\&\fBBIO_ADDR_rawport()\fR returns the raw port of the given \fBBIO_ADDR\fR.
|
||||
The raw port will be in network byte order.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_hostname_string()\fR returns a character string with the
|
||||
hostname of the given \fB\s-1BIO_ADDR\s0\fR. If \fBnumeric\fR is 1, the string
|
||||
hostname of the given \fBBIO_ADDR\fR. If \fBnumeric\fR is 1, the string
|
||||
will contain the numerical form of the address. This only works for
|
||||
\&\fB\s-1BIO_ADDR\s0\fR of the protocol families \s-1AF_INET\s0 and \s-1AF_INET6.\s0 The
|
||||
\&\fBBIO_ADDR\fR of the protocol families AF_INET and AF_INET6. The
|
||||
returned string has been allocated on the heap and must be freed
|
||||
with \fBOPENSSL_free()\fR.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_service_string()\fR returns a character string with the
|
||||
service name of the port of the given \fB\s-1BIO_ADDR\s0\fR. If \fBnumeric\fR
|
||||
service name of the port of the given \fBBIO_ADDR\fR. If \fBnumeric\fR
|
||||
is 1, the string will contain the port number. This only works
|
||||
for \fB\s-1BIO_ADDR\s0\fR of the protocol families \s-1AF_INET\s0 and \s-1AF_INET6.\s0 The
|
||||
for \fBBIO_ADDR\fR of the protocol families AF_INET and AF_INET6. The
|
||||
returned string has been allocated on the heap and must be freed
|
||||
with \fBOPENSSL_free()\fR.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_path_string()\fR returns a character string with the path
|
||||
of the given \fB\s-1BIO_ADDR\s0\fR. This only works for \fB\s-1BIO_ADDR\s0\fR of the
|
||||
protocol family \s-1AF_UNIX.\s0 The returned string has been allocated
|
||||
of the given \fBBIO_ADDR\fR. This only works for \fBBIO_ADDR\fR of the
|
||||
protocol family AF_UNIX. The returned string has been allocated
|
||||
on the heap and must be freed with \fBOPENSSL_free()\fR.
|
||||
.SH "RAW ADDRESSES"
|
||||
.IX Header "RAW ADDRESSES"
|
||||
Both \fBBIO_ADDR_rawmake()\fR and \fBBIO_ADDR_rawaddress()\fR take a pointer to a
|
||||
network byte order address of a specific site. Internally, those are
|
||||
treated as a pointer to \fBstruct in_addr\fR (for \fB\s-1AF_INET\s0\fR), \fBstruct
|
||||
in6_addr\fR (for \fB\s-1AF_INET6\s0\fR) or \fBchar *\fR (for \fB\s-1AF_UNIX\s0\fR), all
|
||||
treated as a pointer to \fBstruct in_addr\fR (for \fBAF_INET\fR), \fBstruct
|
||||
in6_addr\fR (for \fBAF_INET6\fR) or \fBchar *\fR (for \fBAF_UNIX\fR), all
|
||||
depending on the protocol family the address is for.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
The string producing functions \fBBIO_ADDR_hostname_string()\fR,
|
||||
\&\fBBIO_ADDR_service_string()\fR and \fBBIO_ADDR_path_string()\fR will
|
||||
return \fB\s-1NULL\s0\fR on error and leave an error indication on the
|
||||
return \fBNULL\fR on error and leave an error indication on the
|
||||
OpenSSL error stack.
|
||||
.PP
|
||||
All other functions described here return 0 or \fB\s-1NULL\s0\fR when the
|
||||
information they should return isn't available.
|
||||
All other functions described here return 0 or \fBNULL\fR when the
|
||||
information they should return isn\*(Aqt available.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBBIO_connect\fR\|(3), \fBBIO_s_connect\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2016\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2016\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_ADDRINFO 3ossl"
|
||||
.TH BIO_ADDRINFO 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_ADDRINFO 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_lookup_type,
|
||||
BIO_ADDRINFO, BIO_ADDRINFO_next, BIO_ADDRINFO_free,
|
||||
BIO_ADDRINFO_family, BIO_ADDRINFO_socktype, BIO_ADDRINFO_protocol,
|
||||
|
|
@ -146,7 +71,7 @@ BIO_ADDRINFO_address,
|
|||
BIO_lookup_ex,
|
||||
BIO_lookup
|
||||
\&\- BIO_ADDRINFO type and routines
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include <sys/types.h>
|
||||
|
|
@ -171,74 +96,74 @@ BIO_lookup
|
|||
\& const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
|
||||
\& void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fB\s-1BIO_ADDRINFO\s0\fR type is a wrapper for address information
|
||||
The \fBBIO_ADDRINFO\fR type is a wrapper for address information
|
||||
types provided on your platform.
|
||||
.PP
|
||||
\&\fB\s-1BIO_ADDRINFO\s0\fR normally forms a chain of several that can be
|
||||
\&\fBBIO_ADDRINFO\fR normally forms a chain of several that can be
|
||||
picked at one by one.
|
||||
.PP
|
||||
\&\fBBIO_lookup_ex()\fR looks up a specified \fBhost\fR and \fBservice\fR, and
|
||||
uses \fBlookup_type\fR to determine what the default address should
|
||||
be if \fBhost\fR is \fB\s-1NULL\s0\fR. \fBfamily\fR, \fBsocktype\fR and \fBprotocol\fR are used to
|
||||
be if \fBhost\fR is \fBNULL\fR. \fBfamily\fR, \fBsocktype\fR and \fBprotocol\fR are used to
|
||||
determine what protocol family, socket type and protocol should be used for
|
||||
the lookup. \fBfamily\fR can be any of \s-1AF_INET, AF_INET6, AF_UNIX\s0 and
|
||||
\&\s-1AF_UNSPEC.\s0 \fBsocktype\fR can be \s-1SOCK_STREAM, SOCK_DGRAM\s0 or 0. Specifying 0
|
||||
the lookup. \fBfamily\fR can be any of AF_INET, AF_INET6, AF_UNIX and
|
||||
AF_UNSPEC. \fBsocktype\fR can be SOCK_STREAM, SOCK_DGRAM or 0. Specifying 0
|
||||
indicates that any type can be used. \fBprotocol\fR specifies a protocol such as
|
||||
\&\s-1IPPROTO_TCP, IPPROTO_UDP\s0 or \s-1IPPORTO_SCTP.\s0 If set to 0 than any protocol can be
|
||||
used. \fBres\fR points at a pointer to hold the start of a \fB\s-1BIO_ADDRINFO\s0\fR
|
||||
IPPROTO_TCP, IPPROTO_UDP or IPPORTO_SCTP. If set to 0 than any protocol can be
|
||||
used. \fBres\fR points at a pointer to hold the start of a \fBBIO_ADDRINFO\fR
|
||||
chain.
|
||||
.PP
|
||||
For the family \fB\s-1AF_UNIX\s0\fR, \fBBIO_lookup_ex()\fR will ignore the \fBservice\fR
|
||||
For the family \fBAF_UNIX\fR, \fBBIO_lookup_ex()\fR will ignore the \fBservice\fR
|
||||
parameter and expects the \fBhost\fR parameter to hold the path to the socket file.
|
||||
.PP
|
||||
\&\fBBIO_lookup()\fR does the same as \fBBIO_lookup_ex()\fR but does not provide the ability
|
||||
to select based on the protocol (any protocol may be returned).
|
||||
.PP
|
||||
\&\fBBIO_ADDRINFO_family()\fR returns the family of the given
|
||||
\&\fB\s-1BIO_ADDRINFO\s0\fR. The result will be one of the constants
|
||||
\&\s-1AF_INET, AF_INET6\s0 and \s-1AF_UNIX.\s0
|
||||
\&\fBBIO_ADDRINFO\fR. The result will be one of the constants
|
||||
AF_INET, AF_INET6 and AF_UNIX.
|
||||
.PP
|
||||
\&\fBBIO_ADDRINFO_socktype()\fR returns the socket type of the given
|
||||
\&\fB\s-1BIO_ADDRINFO\s0\fR. The result will be one of the constants
|
||||
\&\s-1SOCK_STREAM\s0 and \s-1SOCK_DGRAM.\s0
|
||||
\&\fBBIO_ADDRINFO\fR. The result will be one of the constants
|
||||
SOCK_STREAM and SOCK_DGRAM.
|
||||
.PP
|
||||
\&\fBBIO_ADDRINFO_protocol()\fR returns the protocol id of the given
|
||||
\&\fB\s-1BIO_ADDRINFO\s0\fR. The result will be one of the constants
|
||||
\&\s-1IPPROTO_TCP\s0 and \s-1IPPROTO_UDP.\s0
|
||||
\&\fBBIO_ADDRINFO\fR. The result will be one of the constants
|
||||
IPPROTO_TCP and IPPROTO_UDP.
|
||||
.PP
|
||||
\&\fBBIO_ADDRINFO_address()\fR returns the underlying \fB\s-1BIO_ADDR\s0\fR
|
||||
of the given \fB\s-1BIO_ADDRINFO\s0\fR.
|
||||
\&\fBBIO_ADDRINFO_address()\fR returns the underlying \fBBIO_ADDR\fR
|
||||
of the given \fBBIO_ADDRINFO\fR.
|
||||
.PP
|
||||
\&\fBBIO_ADDRINFO_next()\fR returns the next \fB\s-1BIO_ADDRINFO\s0\fR in the chain
|
||||
\&\fBBIO_ADDRINFO_next()\fR returns the next \fBBIO_ADDRINFO\fR in the chain
|
||||
from the given one.
|
||||
.PP
|
||||
\&\fBBIO_ADDRINFO_free()\fR frees the chain of \fB\s-1BIO_ADDRINFO\s0\fR starting
|
||||
with the given one.
|
||||
\&\fBBIO_ADDRINFO_free()\fR frees the chain of \fBBIO_ADDRINFO\fR starting
|
||||
with the given one. If the argument is NULL, nothing is done.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_lookup_ex()\fR and \fBBIO_lookup()\fR return 1 on success and 0 when an error
|
||||
occurred, and will leave an error indication on the OpenSSL error stack in that
|
||||
case.
|
||||
.PP
|
||||
All other functions described here return 0 or \fB\s-1NULL\s0\fR when the
|
||||
information they should return isn't available.
|
||||
.SH "NOTES"
|
||||
All other functions described here return 0 or \fBNULL\fR when the
|
||||
information they should return isn\*(Aqt available.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The \fBBIO_lookup_ex()\fR implementation uses the platform provided \fBgetaddrinfo()\fR
|
||||
function. On Linux it is known that specifying 0 for the protocol will not
|
||||
return any \s-1SCTP\s0 based addresses when calling \fBgetaddrinfo()\fR. Therefore, if an \s-1SCTP\s0
|
||||
return any SCTP based addresses when calling \fBgetaddrinfo()\fR. Therefore, if an SCTP
|
||||
address is required then the \fBprotocol\fR parameter to \fBBIO_lookup_ex()\fR should be
|
||||
explicitly set to \s-1IPPROTO_SCTP.\s0 The same may be true on other platforms.
|
||||
.SH "HISTORY"
|
||||
explicitly set to IPPROTO_SCTP. The same may be true on other platforms.
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBIO_lookup_ex()\fR function was added in OpenSSL 1.1.1.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2016\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2016\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_CONNECT 3ossl"
|
||||
.TH BIO_CONNECT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_CONNECT 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_socket, BIO_bind, BIO_connect, BIO_listen, BIO_accept_ex, BIO_closesocket \- BIO
|
||||
socket communication setup routines
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -153,7 +78,7 @@ socket communication setup routines
|
|||
\& int BIO_accept_ex(int accept_sock, BIO_ADDR *peer, int options);
|
||||
\& int BIO_closesocket(int sock);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_socket()\fR creates a socket in the domain \fBdomain\fR, of type
|
||||
\&\fBsocktype\fR and \fBprotocol\fR. Socket \fBoptions\fR are currently unused,
|
||||
|
|
@ -161,44 +86,44 @@ but is present for future use.
|
|||
.PP
|
||||
\&\fBBIO_bind()\fR binds the source address and service to a socket and
|
||||
may be useful before calling \fBBIO_connect()\fR. The options may include
|
||||
\&\fB\s-1BIO_SOCK_REUSEADDR\s0\fR, which is described in \*(L"\s-1FLAGS\*(R"\s0 below.
|
||||
\&\fBBIO_SOCK_REUSEADDR\fR, which is described in "FLAGS" below.
|
||||
.PP
|
||||
\&\fBBIO_connect()\fR connects \fBsock\fR to the address and service given by
|
||||
\&\fBaddr\fR. Connection \fBoptions\fR may be zero or any combination of
|
||||
\&\fB\s-1BIO_SOCK_KEEPALIVE\s0\fR, \fB\s-1BIO_SOCK_NONBLOCK\s0\fR and \fB\s-1BIO_SOCK_NODELAY\s0\fR.
|
||||
The flags are described in \*(L"\s-1FLAGS\*(R"\s0 below.
|
||||
\&\fBBIO_SOCK_KEEPALIVE\fR, \fBBIO_SOCK_NONBLOCK\fR and \fBBIO_SOCK_NODELAY\fR.
|
||||
The flags are described in "FLAGS" below.
|
||||
.PP
|
||||
\&\fBBIO_listen()\fR has \fBsock\fR start listening on the address and service
|
||||
given by \fBaddr\fR. Connection \fBoptions\fR may be zero or any
|
||||
combination of \fB\s-1BIO_SOCK_KEEPALIVE\s0\fR, \fB\s-1BIO_SOCK_NONBLOCK\s0\fR,
|
||||
\&\fB\s-1BIO_SOCK_NODELAY\s0\fR, \fB\s-1BIO_SOCK_REUSEADDR\s0\fR and \fB\s-1BIO_SOCK_V6_ONLY\s0\fR.
|
||||
The flags are described in \*(L"\s-1FLAGS\*(R"\s0 below.
|
||||
combination of \fBBIO_SOCK_KEEPALIVE\fR, \fBBIO_SOCK_NONBLOCK\fR,
|
||||
\&\fBBIO_SOCK_NODELAY\fR, \fBBIO_SOCK_REUSEADDR\fR and \fBBIO_SOCK_V6_ONLY\fR.
|
||||
The flags are described in "FLAGS" below.
|
||||
.PP
|
||||
\&\fBBIO_accept_ex()\fR waits for an incoming connections on the given
|
||||
socket \fBaccept_sock\fR. When it gets a connection, the address and
|
||||
port of the peer gets stored in \fBpeer\fR if that one is non-NULL.
|
||||
Accept \fBoptions\fR may be zero or \fB\s-1BIO_SOCK_NONBLOCK\s0\fR, and is applied
|
||||
on the accepted socket. The flags are described in \*(L"\s-1FLAGS\*(R"\s0 below.
|
||||
port of the peer gets stored in \fBpeer\fR if that one is non\-NULL.
|
||||
Accept \fBoptions\fR may be zero or \fBBIO_SOCK_NONBLOCK\fR, and is applied
|
||||
on the accepted socket. The flags are described in "FLAGS" below.
|
||||
.PP
|
||||
\&\fBBIO_closesocket()\fR closes \fBsock\fR.
|
||||
.SH "FLAGS"
|
||||
.SH FLAGS
|
||||
.IX Header "FLAGS"
|
||||
.IP "\s-1BIO_SOCK_KEEPALIVE\s0" 4
|
||||
.IP BIO_SOCK_KEEPALIVE 4
|
||||
.IX Item "BIO_SOCK_KEEPALIVE"
|
||||
Enables regular sending of keep-alive messages.
|
||||
.IP "\s-1BIO_SOCK_NONBLOCK\s0" 4
|
||||
Enables regular sending of keep\-alive messages.
|
||||
.IP BIO_SOCK_NONBLOCK 4
|
||||
.IX Item "BIO_SOCK_NONBLOCK"
|
||||
Sets the socket to nonblocking mode.
|
||||
.IP "\s-1BIO_SOCK_NODELAY\s0" 4
|
||||
.IP BIO_SOCK_NODELAY 4
|
||||
.IX Item "BIO_SOCK_NODELAY"
|
||||
Corresponds to \fB\s-1TCP_NODELAY\s0\fR, and disables the Nagle algorithm. With
|
||||
Corresponds to \fBTCP_NODELAY\fR, and disables the Nagle algorithm. With
|
||||
this set, any data will be sent as soon as possible instead of being
|
||||
buffered until there's enough for the socket to send out in one go.
|
||||
.IP "\s-1BIO_SOCK_REUSEADDR\s0" 4
|
||||
buffered until there\*(Aqs enough for the socket to send out in one go.
|
||||
.IP BIO_SOCK_REUSEADDR 4
|
||||
.IX Item "BIO_SOCK_REUSEADDR"
|
||||
Try to reuse the address and port combination for a recently closed
|
||||
port.
|
||||
.IP "\s-1BIO_SOCK_V6_ONLY\s0" 4
|
||||
.IP BIO_SOCK_V6_ONLY 4
|
||||
.IX Item "BIO_SOCK_V6_ONLY"
|
||||
When creating an IPv6 socket, make it only listen for IPv6 addresses
|
||||
and not IPv4 addresses mapped to IPv6.
|
||||
|
|
@ -211,7 +136,7 @@ These flags are bit flags, so they are to be combined with the
|
|||
.Ve
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_socket()\fR returns the socket number on success or \fB\s-1INVALID_SOCKET\s0\fR
|
||||
\&\fBBIO_socket()\fR returns the socket number on success or \fBINVALID_SOCKET\fR
|
||||
(\-1) on error. When an error has occurred, the OpenSSL error stack
|
||||
will hold the error data and errno has the system error.
|
||||
.PP
|
||||
|
|
@ -220,22 +145,22 @@ When an error has occurred, the OpenSSL error stack will hold the error
|
|||
data and errno has the system error.
|
||||
.PP
|
||||
\&\fBBIO_accept_ex()\fR returns the accepted socket on success or
|
||||
\&\fB\s-1INVALID_SOCKET\s0\fR (\-1) on error. When an error has occurred, the
|
||||
\&\fBINVALID_SOCKET\fR (\-1) on error. When an error has occurred, the
|
||||
OpenSSL error stack will hold the error data and errno has the system
|
||||
error.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\s-1\fBBIO_ADDR\s0\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
\&\fBBIO_ADDR\fR\|(3)
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBIO_gethostname()\fR, \fBBIO_get_port()\fR, \fBBIO_get_host_ip()\fR,
|
||||
\&\fBBIO_get_accept_socket()\fR and \fBBIO_accept()\fR were deprecated in OpenSSL 1.1.0.
|
||||
Use the functions described above instead.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2016\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,83 +53,24 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_CTRL 3ossl"
|
||||
.TH BIO_CTRL 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_CTRL 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset,
|
||||
BIO_seek, BIO_tell, BIO_flush, BIO_eof, BIO_set_close, BIO_get_close,
|
||||
BIO_pending, BIO_wpending, BIO_ctrl_pending, BIO_ctrl_wpending,
|
||||
BIO_get_info_callback, BIO_set_info_callback, BIO_info_cb, BIO_get_ktls_send,
|
||||
BIO_get_ktls_recv
|
||||
\&\- BIO control operations
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -175,35 +100,35 @@ BIO_get_ktls_recv
|
|||
\& int BIO_get_ktls_send(BIO *b);
|
||||
\& int BIO_get_ktls_recv(BIO *b);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_ctrl()\fR, \fBBIO_callback_ctrl()\fR, \fBBIO_ptr_ctrl()\fR and \fBBIO_int_ctrl()\fR
|
||||
are \s-1BIO\s0 \*(L"control\*(R" operations taking arguments of various types.
|
||||
are BIO "control" operations taking arguments of various types.
|
||||
These functions are not normally called directly, various macros
|
||||
are used instead. The standard macros are described below, macros
|
||||
specific to a particular type of \s-1BIO\s0 are described in the specific
|
||||
specific to a particular type of BIO are described in the specific
|
||||
BIOs manual page as well as any special features of the standard
|
||||
calls.
|
||||
.PP
|
||||
\&\fBBIO_reset()\fR typically resets a \s-1BIO\s0 to some initial state, in the case
|
||||
\&\fBBIO_reset()\fR typically resets a BIO to some initial state, in the case
|
||||
of file related BIOs for example it rewinds the file pointer to the
|
||||
start of the file.
|
||||
.PP
|
||||
\&\fBBIO_seek()\fR resets a file related \s-1BIO\s0's (that is file descriptor and
|
||||
\&\s-1FILE\s0 BIOs) file position pointer to \fBofs\fR bytes from start of file.
|
||||
\&\fBBIO_seek()\fR resets a file related BIO\*(Aqs (that is file descriptor and
|
||||
FILE BIOs) file position pointer to \fBofs\fR bytes from start of file.
|
||||
.PP
|
||||
\&\fBBIO_tell()\fR returns the current file position of a file related \s-1BIO.\s0
|
||||
\&\fBBIO_tell()\fR returns the current file position of a file related BIO.
|
||||
.PP
|
||||
\&\fBBIO_flush()\fR normally writes out any internally buffered data, in some
|
||||
cases it is used to signal \s-1EOF\s0 and that no more data will be written.
|
||||
cases it is used to signal EOF and that no more data will be written.
|
||||
.PP
|
||||
\&\fBBIO_eof()\fR returns 1 if the \s-1BIO\s0 has read \s-1EOF,\s0 the precise meaning of
|
||||
\&\*(L"\s-1EOF\*(R"\s0 varies according to the \s-1BIO\s0 type.
|
||||
\&\fBBIO_eof()\fR returns 1 if the BIO has read EOF, the precise meaning of
|
||||
"EOF" varies according to the BIO type.
|
||||
.PP
|
||||
\&\fBBIO_set_close()\fR sets the \s-1BIO\s0 \fBb\fR close flag to \fBflag\fR. \fBflag\fR can
|
||||
take the value \s-1BIO_CLOSE\s0 or \s-1BIO_NOCLOSE.\s0 Typically \s-1BIO_CLOSE\s0 is used
|
||||
in a source/sink \s-1BIO\s0 to indicate that the underlying I/O stream should
|
||||
be closed when the \s-1BIO\s0 is freed.
|
||||
\&\fBBIO_set_close()\fR sets the BIO \fBb\fR close flag to \fBflag\fR. \fBflag\fR can
|
||||
take the value BIO_CLOSE or BIO_NOCLOSE. Typically BIO_CLOSE is used
|
||||
in a source/sink BIO to indicate that the underlying I/O stream should
|
||||
be closed when the BIO is freed.
|
||||
.PP
|
||||
\&\fBBIO_get_close()\fR returns the BIOs close flag.
|
||||
.PP
|
||||
|
|
@ -213,9 +138,9 @@ Not all BIOs support these calls. \fBBIO_ctrl_pending()\fR and \fBBIO_ctrl_wpend
|
|||
return a size_t type and are functions, \fBBIO_pending()\fR and \fBBIO_wpending()\fR are
|
||||
macros which call \fBBIO_ctrl()\fR.
|
||||
.PP
|
||||
\&\fBBIO_get_ktls_send()\fR returns 1 if the \s-1BIO\s0 is using the Kernel \s-1TLS\s0 data-path for
|
||||
\&\fBBIO_get_ktls_send()\fR returns 1 if the BIO is using the Kernel TLS data\-path for
|
||||
sending. Otherwise, it returns zero.
|
||||
\&\fBBIO_get_ktls_recv()\fR returns 1 if the \s-1BIO\s0 is using the Kernel \s-1TLS\s0 data-path for
|
||||
\&\fBBIO_get_ktls_recv()\fR returns 1 if the BIO is using the Kernel TLS data\-path for
|
||||
receiving. Otherwise, it returns zero.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
|
|
@ -228,11 +153,11 @@ for success and \-1 for failure.
|
|||
.PP
|
||||
\&\fBBIO_flush()\fR returns 1 for success and <=0 for failure.
|
||||
.PP
|
||||
\&\fBBIO_eof()\fR returns 1 if \s-1EOF\s0 has been reached, 0 if not, or negative values for failure.
|
||||
\&\fBBIO_eof()\fR returns 1 if EOF has been reached, 0 if not, or negative values for failure.
|
||||
.PP
|
||||
\&\fBBIO_set_close()\fR returns 1 on success or <=0 for failure.
|
||||
.PP
|
||||
\&\fBBIO_get_close()\fR returns the close flag value: \s-1BIO_CLOSE\s0 or \s-1BIO_NOCLOSE.\s0 It also
|
||||
\&\fBBIO_get_close()\fR returns the close flag value: BIO_CLOSE or BIO_NOCLOSE. It also
|
||||
returns other negative values if an error occurs.
|
||||
.PP
|
||||
\&\fBBIO_pending()\fR, \fBBIO_ctrl_pending()\fR, \fBBIO_wpending()\fR and \fBBIO_ctrl_wpending()\fR
|
||||
|
|
@ -240,11 +165,11 @@ return the amount of pending data. \fBBIO_pending()\fR and \fBBIO_wpending()\fR
|
|||
negative value or 0 on error. \fBBIO_ctrl_pending()\fR and \fBBIO_ctrl_wpending()\fR return
|
||||
0 on error.
|
||||
.PP
|
||||
\&\fBBIO_get_ktls_send()\fR returns 1 if the \s-1BIO\s0 is using the Kernel \s-1TLS\s0 data-path for
|
||||
\&\fBBIO_get_ktls_send()\fR returns 1 if the BIO is using the Kernel TLS data\-path for
|
||||
sending. Otherwise, it returns zero.
|
||||
\&\fBBIO_get_ktls_recv()\fR returns 1 if the \s-1BIO\s0 is using the Kernel \s-1TLS\s0 data-path for
|
||||
\&\fBBIO_get_ktls_recv()\fR returns 1 if the BIO is using the Kernel TLS data\-path for
|
||||
receiving. Otherwise, it returns zero.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
\&\fBBIO_flush()\fR, because it can write data may return 0 or \-1 indicating
|
||||
that the call should be retried later in a similar manner to \fBBIO_write_ex()\fR.
|
||||
|
|
@ -253,39 +178,39 @@ is the call fails.
|
|||
.PP
|
||||
The return values of \fBBIO_pending()\fR and \fBBIO_wpending()\fR may not reliably
|
||||
determine the amount of pending data in all cases. For example in the
|
||||
case of a file \s-1BIO\s0 some data may be available in the \s-1FILE\s0 structures
|
||||
case of a file BIO some data may be available in the FILE structures
|
||||
internal buffers but it is not possible to determine this in a
|
||||
portably way. For other types of \s-1BIO\s0 they may not be supported.
|
||||
portably way. For other types of BIO they may not be supported.
|
||||
.PP
|
||||
Filter BIOs if they do not internally handle a particular \fBBIO_ctrl()\fR
|
||||
operation usually pass the operation to the next \s-1BIO\s0 in the chain.
|
||||
This often means there is no need to locate the required \s-1BIO\s0 for
|
||||
operation usually pass the operation to the next BIO in the chain.
|
||||
This often means there is no need to locate the required BIO for
|
||||
a particular operation, it can be called on a chain and it will
|
||||
be automatically passed to the relevant \s-1BIO.\s0 However, this can cause
|
||||
be automatically passed to the relevant BIO. However, this can cause
|
||||
unexpected results: for example no current filter BIOs implement
|
||||
\&\fBBIO_seek()\fR, but this may still succeed if the chain ends in a \s-1FILE\s0
|
||||
or file descriptor \s-1BIO.\s0
|
||||
\&\fBBIO_seek()\fR, but this may still succeed if the chain ends in a FILE
|
||||
or file descriptor BIO.
|
||||
.PP
|
||||
Source/sink BIOs return an 0 if they do not recognize the \fBBIO_ctrl()\fR
|
||||
operation.
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
Some of the return values are ambiguous and care should be taken. In
|
||||
particular a return value of 0 can be returned if an operation is not
|
||||
supported, if an error occurred, if \s-1EOF\s0 has not been reached and in
|
||||
the case of \fBBIO_seek()\fR on a file \s-1BIO\s0 for a successful operation.
|
||||
supported, if an error occurred, if EOF has not been reached and in
|
||||
the case of \fBBIO_seek()\fR on a file BIO for a successful operation.
|
||||
.PP
|
||||
In older versions of OpenSSL the \fBBIO_ctrl_pending()\fR and
|
||||
\&\fBBIO_ctrl_wpending()\fR could return values greater than \s-1INT_MAX\s0 on error.
|
||||
.SH "HISTORY"
|
||||
\&\fBBIO_ctrl_wpending()\fR could return values greater than INT_MAX on error.
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBIO_get_ktls_send()\fR and \fBBIO_get_ktls_recv()\fR macros were added in
|
||||
OpenSSL 3.0. They were modified to never return \-1 in OpenSSL 3.0.4.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_BASE64 3ossl"
|
||||
.TH BIO_F_BASE64 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_F_BASE64 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_f_base64 \- base64 BIO filter
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -148,43 +73,41 @@ BIO_f_base64 \- base64 BIO filter
|
|||
\&
|
||||
\& const BIO_METHOD *BIO_f_base64(void);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_base64()\fR returns the base64 \s-1BIO\s0 method. This is a filter
|
||||
\&\s-1BIO\s0 that base64 encodes any data written through it and decodes
|
||||
\&\fBBIO_f_base64()\fR returns the base64 BIO method. This is a filter
|
||||
BIO that base64 encodes any data written through it and decodes
|
||||
any data read through it.
|
||||
.PP
|
||||
Base64 BIOs do not support \fBBIO_gets()\fR or \fBBIO_puts()\fR.
|
||||
.PP
|
||||
For writing, output is by default divided to lines of length 64
|
||||
characters and there is always a newline at the end of output.
|
||||
For writing, by default output is divided to lines of length 64
|
||||
characters and there is a newline at the end of output.
|
||||
This behavior can be changed with \fBBIO_FLAGS_BASE64_NO_NL\fR flag.
|
||||
.PP
|
||||
For reading, first line should be at most 1024
|
||||
characters long. If it is longer then it is ignored completely.
|
||||
Other input lines can be of any length. There must be a newline
|
||||
at the end of input.
|
||||
For reading, first line should be at most 1024 bytes long including newline
|
||||
unless the flag \fBBIO_FLAGS_BASE64_NO_NL\fR is set.
|
||||
Further input lines can be of any length (i.e., newlines may appear anywhere
|
||||
in the input) and a newline at the end of input is not needed.
|
||||
.PP
|
||||
This behavior can be changed with \s-1BIO_FLAGS_BASE64_NO_NL\s0 flag.
|
||||
.PP
|
||||
\&\fBBIO_flush()\fR on a base64 \s-1BIO\s0 that is being written through is
|
||||
\&\fBBIO_flush()\fR on a base64 BIO that is being written through is
|
||||
used to signal that no more data is to be encoded: this is used
|
||||
to flush the final block through the \s-1BIO.\s0
|
||||
to flush the final block through the BIO.
|
||||
.PP
|
||||
The flag \s-1BIO_FLAGS_BASE64_NO_NL\s0 can be set with \fBBIO_set_flags()\fR.
|
||||
The flag \fBBIO_FLAGS_BASE64_NO_NL\fR can be set with \fBBIO_set_flags()\fR.
|
||||
For writing, it causes all data to be written on one line without
|
||||
newline at the end.
|
||||
For reading, it expects the data to be all on one line (with or
|
||||
without a trailing newline).
|
||||
.SH "NOTES"
|
||||
For reading, it removes all expectations on newlines in the input data.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Because of the format of base64 encoding the end of the encoded
|
||||
block cannot always be reliably determined.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_f_base64()\fR returns the base64 \s-1BIO\s0 method.
|
||||
.SH "EXAMPLES"
|
||||
\&\fBBIO_f_base64()\fR returns the base64 BIO method.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
Base64 encode the string \*(L"Hello World\en\*(R" and write the result
|
||||
Base64 encode the string "Hello World\en" and write the result
|
||||
to standard output:
|
||||
.PP
|
||||
.Vb 2
|
||||
|
|
@ -218,18 +141,22 @@ data to standard output:
|
|||
\& BIO_flush(bio_out);
|
||||
\& BIO_free_all(b64);
|
||||
.Ve
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
The ambiguity of \s-1EOF\s0 in base64 encoded data can cause additional
|
||||
On decoding, if the flag \fBBIO_FLAGS_BASE64_NO_NL\fR is not set and
|
||||
the first 1024 bytes of input do not include a newline character
|
||||
the first two lines of input are ignored.
|
||||
.PP
|
||||
The ambiguity of EOF in base64 encoded data can cause additional
|
||||
data following the base64 encoded block to be misinterpreted.
|
||||
.PP
|
||||
There should be some way of specifying a test that the \s-1BIO\s0 can perform
|
||||
to reliably determine \s-1EOF\s0 (for example a \s-1MIME\s0 boundary).
|
||||
.SH "COPYRIGHT"
|
||||
There should be some way of specifying a test that the BIO can perform
|
||||
to reliably determine EOF (for example a MIME boundary).
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2000\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_BUFFER 3ossl"
|
||||
.TH BIO_F_BUFFER 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_F_BUFFER 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_get_buffer_num_lines,
|
||||
BIO_set_read_buffer_size,
|
||||
BIO_set_write_buffer_size,
|
||||
|
|
@ -146,7 +71,7 @@ BIO_set_buffer_size,
|
|||
BIO_set_buffer_read_data,
|
||||
BIO_f_buffer
|
||||
\&\- buffering BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -159,55 +84,55 @@ BIO_f_buffer
|
|||
\& long BIO_set_buffer_size(BIO *b, long size);
|
||||
\& long BIO_set_buffer_read_data(BIO *b, void *buf, long num);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_buffer()\fR returns the buffering \s-1BIO\s0 method.
|
||||
\&\fBBIO_f_buffer()\fR returns the buffering BIO method.
|
||||
.PP
|
||||
Data written to a buffering \s-1BIO\s0 is buffered and periodically written
|
||||
to the next \s-1BIO\s0 in the chain. Data read from a buffering \s-1BIO\s0 comes from
|
||||
an internal buffer which is filled from the next \s-1BIO\s0 in the chain.
|
||||
Data written to a buffering BIO is buffered and periodically written
|
||||
to the next BIO in the chain. Data read from a buffering BIO comes from
|
||||
an internal buffer which is filled from the next BIO in the chain.
|
||||
Both \fBBIO_gets()\fR and \fBBIO_puts()\fR are supported.
|
||||
.PP
|
||||
Calling \fBBIO_reset()\fR on a buffering \s-1BIO\s0 clears any buffered data.
|
||||
Calling \fBBIO_reset()\fR on a buffering BIO clears any buffered data.
|
||||
.PP
|
||||
\&\fBBIO_get_buffer_num_lines()\fR returns the number of lines currently buffered.
|
||||
.PP
|
||||
\&\fBBIO_set_read_buffer_size()\fR, \fBBIO_set_write_buffer_size()\fR and \fBBIO_set_buffer_size()\fR
|
||||
set the read, write or both read and write buffer sizes to \fBsize\fR. The initial
|
||||
buffer size is \s-1DEFAULT_BUFFER_SIZE,\s0 currently 4096. Any attempt to reduce the
|
||||
buffer size below \s-1DEFAULT_BUFFER_SIZE\s0 is ignored. Any buffered data is cleared
|
||||
buffer size is DEFAULT_BUFFER_SIZE, currently 4096. Any attempt to reduce the
|
||||
buffer size below DEFAULT_BUFFER_SIZE is ignored. Any buffered data is cleared
|
||||
when the buffer is resized.
|
||||
.PP
|
||||
\&\fBBIO_set_buffer_read_data()\fR clears the read buffer and fills it with \fBnum\fR
|
||||
bytes of \fBbuf\fR. If \fBnum\fR is larger than the current buffer size the buffer
|
||||
is expanded.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
These functions, other than \fBBIO_f_buffer()\fR, are implemented as macros.
|
||||
.PP
|
||||
Buffering BIOs implement \fBBIO_read_ex()\fR and \fBBIO_gets()\fR by using
|
||||
\&\fBBIO_read_ex()\fR operations on the next \s-1BIO\s0 in the chain and storing the
|
||||
\&\fBBIO_read_ex()\fR operations on the next BIO in the chain and storing the
|
||||
result in an internal buffer, from which bytes are given back to the
|
||||
caller as appropriate for the call; a \fBBIO_gets()\fR is guaranteed to give
|
||||
the caller a whole line, and \fBBIO_read_ex()\fR is guaranteed to give the
|
||||
caller the number of bytes it asks for, unless there's an error or end
|
||||
of communication is reached in the next \s-1BIO.\s0 By prepending a
|
||||
buffering \s-1BIO\s0 to a chain it is therefore possible to provide
|
||||
caller the number of bytes it asks for, unless there\*(Aqs an error or end
|
||||
of communication is reached in the next BIO. By prepending a
|
||||
buffering BIO to a chain it is therefore possible to provide
|
||||
\&\fBBIO_gets()\fR or exact size \fBBIO_read_ex()\fR functionality if the following
|
||||
BIOs do not support it.
|
||||
.PP
|
||||
Do not add more than one \fBBIO_f_buffer()\fR to a \s-1BIO\s0 chain. The result of
|
||||
Do not add more than one \fBBIO_f_buffer()\fR to a BIO chain. The result of
|
||||
doing so will force a full read of the size of the internal buffer of
|
||||
the top \fBBIO_f_buffer()\fR, which is 4 KiB at a minimum.
|
||||
.PP
|
||||
Data is only written to the next \s-1BIO\s0 in the chain when the write buffer fills
|
||||
Data is only written to the next BIO in the chain when the write buffer fills
|
||||
or when \fBBIO_flush()\fR is called. It is therefore important to call \fBBIO_flush()\fR
|
||||
whenever any pending data should be written such as when removing a buffering
|
||||
\&\s-1BIO\s0 using \fBBIO_pop()\fR. \fBBIO_flush()\fR may need to be retried if the ultimate
|
||||
source/sink \s-1BIO\s0 is non blocking.
|
||||
BIO using \fBBIO_pop()\fR. \fBBIO_flush()\fR may need to be retried if the ultimate
|
||||
source/sink BIO is non blocking.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_f_buffer()\fR returns the buffering \s-1BIO\s0 method.
|
||||
\&\fBBIO_f_buffer()\fR returns the buffering BIO method.
|
||||
.PP
|
||||
\&\fBBIO_get_buffer_num_lines()\fR returns the number of lines buffered (may be 0) or
|
||||
a negative value in case of errors.
|
||||
|
|
@ -224,11 +149,11 @@ there was an error.
|
|||
\&\fBBIO_flush\fR\|(3),
|
||||
\&\fBBIO_pop\fR\|(3),
|
||||
\&\fBBIO_ctrl\fR\|(3).
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_CIPHER 3ossl"
|
||||
.TH BIO_F_CIPHER 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_F_CIPHER 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx \- cipher BIO filter
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -152,48 +77,48 @@ BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx \- ciphe
|
|||
\& int BIO_get_cipher_status(BIO *b);
|
||||
\& int BIO_get_cipher_ctx(BIO *b, EVP_CIPHER_CTX **pctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_cipher()\fR returns the cipher \s-1BIO\s0 method. This is a filter
|
||||
\&\s-1BIO\s0 that encrypts any data written through it, and decrypts any data
|
||||
read from it. It is a \s-1BIO\s0 wrapper for the cipher routines
|
||||
\&\fBBIO_f_cipher()\fR returns the cipher BIO method. This is a filter
|
||||
BIO that encrypts any data written through it, and decrypts any data
|
||||
read from it. It is a BIO wrapper for the cipher routines
|
||||
\&\fBEVP_CipherInit()\fR, \fBEVP_CipherUpdate()\fR and \fBEVP_CipherFinal()\fR.
|
||||
.PP
|
||||
Cipher BIOs do not support \fBBIO_gets()\fR or \fBBIO_puts()\fR.
|
||||
.PP
|
||||
\&\fBBIO_flush()\fR on an encryption \s-1BIO\s0 that is being written through is
|
||||
\&\fBBIO_flush()\fR on an encryption BIO that is being written through is
|
||||
used to signal that no more data is to be encrypted: this is used
|
||||
to flush and possibly pad the final block through the \s-1BIO.\s0
|
||||
to flush and possibly pad the final block through the BIO.
|
||||
.PP
|
||||
\&\fBBIO_set_cipher()\fR sets the cipher of \s-1BIO\s0 \fBb\fR to \fBcipher\fR using key \fBkey\fR
|
||||
and \s-1IV\s0 \fBiv\fR. \fBenc\fR should be set to 1 for encryption and zero for
|
||||
\&\fBBIO_set_cipher()\fR sets the cipher of BIO \fBb\fR to \fBcipher\fR using key \fBkey\fR
|
||||
and IV \fBiv\fR. \fBenc\fR should be set to 1 for encryption and zero for
|
||||
decryption.
|
||||
.PP
|
||||
When reading from an encryption \s-1BIO\s0 the final block is automatically
|
||||
decrypted and checked when \s-1EOF\s0 is detected. \fBBIO_get_cipher_status()\fR
|
||||
When reading from an encryption BIO the final block is automatically
|
||||
decrypted and checked when EOF is detected. \fBBIO_get_cipher_status()\fR
|
||||
is a \fBBIO_ctrl()\fR macro which can be called to determine whether the
|
||||
decryption operation was successful.
|
||||
.PP
|
||||
\&\fBBIO_get_cipher_ctx()\fR is a \fBBIO_ctrl()\fR macro which retrieves the internal
|
||||
\&\s-1BIO\s0 cipher context. The retrieved context can be used in conjunction
|
||||
BIO cipher context. The retrieved context can be used in conjunction
|
||||
with the standard cipher routines to set it up. This is useful when
|
||||
\&\fBBIO_set_cipher()\fR is not flexible enough for the applications needs.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
When encrypting \fBBIO_flush()\fR \fBmust\fR be called to flush the final block
|
||||
through the \s-1BIO.\s0 If it is not then the final block will fail a subsequent
|
||||
through the BIO. If it is not then the final block will fail a subsequent
|
||||
decrypt.
|
||||
.PP
|
||||
When decrypting an error on the final block is signaled by a zero
|
||||
return value from the read operation. A successful decrypt followed
|
||||
by \s-1EOF\s0 will also return zero for the final read. \fBBIO_get_cipher_status()\fR
|
||||
by EOF will also return zero for the final read. \fBBIO_get_cipher_status()\fR
|
||||
should be called to determine if the decrypt was successful.
|
||||
.PP
|
||||
As always, if \fBBIO_gets()\fR or \fBBIO_puts()\fR support is needed then it can
|
||||
be achieved by preceding the cipher \s-1BIO\s0 with a buffering \s-1BIO.\s0
|
||||
be achieved by preceding the cipher BIO with a buffering BIO.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_f_cipher()\fR returns the cipher \s-1BIO\s0 method.
|
||||
\&\fBBIO_f_cipher()\fR returns the cipher BIO method.
|
||||
.PP
|
||||
\&\fBBIO_set_cipher()\fR returns 1 for success and 0 for failure.
|
||||
.PP
|
||||
|
|
@ -201,11 +126,11 @@ be achieved by preceding the cipher \s-1BIO\s0 with a buffering \s-1BIO.\s0
|
|||
for failure.
|
||||
.PP
|
||||
\&\fBBIO_get_cipher_ctx()\fR returns 1 for success and <=0 for failure.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_MD 3ossl"
|
||||
.TH BIO_F_MD 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_F_MD 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx \- message digest BIO filter
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -151,31 +76,31 @@ BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx \- message digest BIO filter
|
|||
\& int BIO_get_md(BIO *b, EVP_MD **mdp);
|
||||
\& int BIO_get_md_ctx(BIO *b, EVP_MD_CTX **mdcp);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_md()\fR returns the message digest \s-1BIO\s0 method. This is a filter
|
||||
\&\s-1BIO\s0 that digests any data passed through it, it is a \s-1BIO\s0 wrapper
|
||||
\&\fBBIO_f_md()\fR returns the message digest BIO method. This is a filter
|
||||
BIO that digests any data passed through it. It is a BIO wrapper
|
||||
for the digest routines \fBEVP_DigestInit()\fR, \fBEVP_DigestUpdate()\fR
|
||||
and \fBEVP_DigestFinal()\fR.
|
||||
.PP
|
||||
Any data written or read through a digest \s-1BIO\s0 using \fBBIO_read_ex()\fR and
|
||||
Any data written or read through a digest BIO using \fBBIO_read_ex()\fR and
|
||||
\&\fBBIO_write_ex()\fR is digested.
|
||||
.PP
|
||||
\&\fBBIO_gets()\fR, if its \fBsize\fR parameter is large enough finishes the
|
||||
digest calculation and returns the digest value. \fBBIO_puts()\fR is
|
||||
not supported.
|
||||
.PP
|
||||
\&\fBBIO_reset()\fR reinitialises a digest \s-1BIO.\s0
|
||||
\&\fBBIO_reset()\fR reinitialises a digest BIO.
|
||||
.PP
|
||||
\&\fBBIO_set_md()\fR sets the message digest of \s-1BIO\s0 \fBb\fR to \fBmd\fR: this
|
||||
must be called to initialize a digest \s-1BIO\s0 before any data is
|
||||
\&\fBBIO_set_md()\fR sets the message digest of BIO \fBb\fR to \fBmd\fR: this
|
||||
must be called to initialize a digest BIO before any data is
|
||||
passed through it. It is a \fBBIO_ctrl()\fR macro.
|
||||
.PP
|
||||
\&\fBBIO_get_md()\fR places the a pointer to the digest BIOs digest method
|
||||
in \fBmdp\fR, it is a \fBBIO_ctrl()\fR macro.
|
||||
\&\fBBIO_get_md()\fR places a pointer to the digest BIOs digest method
|
||||
in \fBmdp\fR. It is a \fBBIO_ctrl()\fR macro.
|
||||
.PP
|
||||
\&\fBBIO_get_md_ctx()\fR returns the digest BIOs context into \fBmdcp\fR.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The context returned by \fBBIO_get_md_ctx()\fR can be used in calls
|
||||
to \fBEVP_DigestFinal()\fR and also the signature routines \fBEVP_SignFinal()\fR
|
||||
|
|
@ -183,30 +108,30 @@ and \fBEVP_VerifyFinal()\fR.
|
|||
.PP
|
||||
The context returned by \fBBIO_get_md_ctx()\fR is an internal context
|
||||
structure. Changes made to this context will affect the digest
|
||||
\&\s-1BIO\s0 itself and the context pointer will become invalid when the digest
|
||||
\&\s-1BIO\s0 is freed.
|
||||
BIO itself and the context pointer will become invalid when the digest
|
||||
BIO is freed.
|
||||
.PP
|
||||
After the digest has been retrieved from a digest \s-1BIO\s0 it must be
|
||||
After the digest has been retrieved from a digest BIO it must be
|
||||
reinitialized by calling \fBBIO_reset()\fR, or \fBBIO_set_md()\fR before any more
|
||||
data is passed through it.
|
||||
.PP
|
||||
If an application needs to call \fBBIO_gets()\fR or \fBBIO_puts()\fR through
|
||||
a chain containing digest BIOs then this can be done by prepending
|
||||
a buffering \s-1BIO.\s0
|
||||
a buffering BIO.
|
||||
.PP
|
||||
Calling \fBBIO_get_md_ctx()\fR will return the context and initialize the \s-1BIO\s0
|
||||
Calling \fBBIO_get_md_ctx()\fR will return the context and initialize the BIO
|
||||
state. This allows applications to initialize the context externally
|
||||
if the standard calls such as \fBBIO_set_md()\fR are not sufficiently flexible.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_f_md()\fR returns the digest \s-1BIO\s0 method.
|
||||
\&\fBBIO_f_md()\fR returns the digest BIO method.
|
||||
.PP
|
||||
\&\fBBIO_set_md()\fR, \fBBIO_get_md()\fR and \fBBIO_md_ctx()\fR return 1 for success and
|
||||
<=0 for failure.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
The following example creates a \s-1BIO\s0 chain containing an \s-1SHA1\s0 and \s-1MD5\s0
|
||||
digest \s-1BIO\s0 and passes the string \*(L"Hello World\*(R" through it. Error
|
||||
The following example creates a BIO chain containing an SHA1 and MD5
|
||||
digest BIO and passes the string "Hello World" through it. Error
|
||||
checking has been omitted for clarity.
|
||||
.PP
|
||||
.Vb 2
|
||||
|
|
@ -248,7 +173,7 @@ The next example digests data by reading through a chain instead:
|
|||
\& } while (rdlen > 0);
|
||||
.Ve
|
||||
.PP
|
||||
This next example retrieves the message digests from a \s-1BIO\s0 chain and
|
||||
This next example retrieves the message digests from a BIO chain and
|
||||
outputs them. This could be used with the examples above.
|
||||
.PP
|
||||
.Vb 4
|
||||
|
|
@ -274,22 +199,22 @@ outputs them. This could be used with the examples above.
|
|||
\&
|
||||
\& BIO_free_all(bio);
|
||||
.Ve
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
The lack of support for \fBBIO_puts()\fR and the non standard behaviour of
|
||||
\&\fBBIO_gets()\fR could be regarded as anomalous. It could be argued that \fBBIO_gets()\fR
|
||||
and \fBBIO_puts()\fR should be passed to the next \s-1BIO\s0 in the chain and digest
|
||||
and \fBBIO_puts()\fR should be passed to the next BIO in the chain and digest
|
||||
the data passed through and that digests should be retrieved using a
|
||||
separate \fBBIO_ctrl()\fR call.
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
Before OpenSSL 1.0.0., the call to \fBBIO_get_md_ctx()\fR would only work if the
|
||||
\&\s-1BIO\s0 was initialized first.
|
||||
.SH "COPYRIGHT"
|
||||
BIO was initialized first.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,103 +53,44 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_NULL 3ossl"
|
||||
.TH BIO_F_NULL 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_F_NULL 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_f_null \- null filter
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
\&
|
||||
\& const BIO_METHOD *BIO_f_null(void);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_null()\fR returns the null filter \s-1BIO\s0 method. This is a filter \s-1BIO\s0
|
||||
\&\fBBIO_f_null()\fR returns the null filter BIO method. This is a filter BIO
|
||||
that does nothing.
|
||||
.PP
|
||||
All requests to a null filter \s-1BIO\s0 are passed through to the next \s-1BIO\s0 in
|
||||
the chain: this means that a \s-1BIO\s0 chain containing a null filter \s-1BIO\s0
|
||||
behaves just as though the \s-1BIO\s0 was not there.
|
||||
.SH "NOTES"
|
||||
All requests to a null filter BIO are passed through to the next BIO in
|
||||
the chain: this means that a BIO chain containing a null filter BIO
|
||||
behaves just as though the BIO was not there.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
As may be apparent a null filter \s-1BIO\s0 is not particularly useful.
|
||||
As may be apparent a null filter BIO is not particularly useful.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_f_null()\fR returns the null filter \s-1BIO\s0 method.
|
||||
.SH "COPYRIGHT"
|
||||
\&\fBBIO_f_null()\fR returns the null filter BIO method.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_PREFIX 3ossl"
|
||||
.TH BIO_F_PREFIX 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_F_PREFIX 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_f_prefix, BIO_set_prefix, BIO_set_indent, BIO_get_indent
|
||||
\&\- prefix BIO filter
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -151,9 +76,9 @@ BIO_f_prefix, BIO_set_prefix, BIO_set_indent, BIO_get_indent
|
|||
\& long BIO_set_indent(BIO *b, long indent);
|
||||
\& long BIO_get_indent(BIO *b);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_cipher()\fR returns the prefix \s-1BIO\s0 method. This is a filter for
|
||||
\&\fBBIO_f_cipher()\fR returns the prefix BIO method. This is a filter for
|
||||
text output, where each line gets automatically prefixed and indented
|
||||
according to user input.
|
||||
.PP
|
||||
|
|
@ -165,21 +90,21 @@ itself.
|
|||
By default, there is no prefix, and indentation is set to 0.
|
||||
.PP
|
||||
\&\fBBIO_set_prefix()\fR sets the prefix to be used for future lines of
|
||||
text, using \fIprefix\fR. \fIprefix\fR may be \s-1NULL,\s0 signifying that there
|
||||
should be no prefix. If \fIprefix\fR isn't \s-1NULL,\s0 this function makes a
|
||||
text, using \fIprefix\fR. \fIprefix\fR may be NULL, signifying that there
|
||||
should be no prefix. If \fIprefix\fR isn\*(Aqt NULL, this function makes a
|
||||
copy of it.
|
||||
.PP
|
||||
\&\fBBIO_set_indent()\fR sets the indentation to be used for future lines of
|
||||
text, using \fIindent\fR. Negative values are not allowed.
|
||||
.PP
|
||||
\&\fBBIO_get_indent()\fR gets the current indentation.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
\&\fBBIO_set_prefix()\fR, \fBBIO_set_indent()\fR and \fBBIO_get_indent()\fR are
|
||||
implemented as macros.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_f_prefix()\fR returns the prefix \s-1BIO\s0 method.
|
||||
\&\fBBIO_f_prefix()\fR returns the prefix BIO method.
|
||||
.PP
|
||||
\&\fBBIO_set_prefix()\fR returns 1 if the prefix was correctly set, or <=0 on
|
||||
failure.
|
||||
|
|
@ -191,11 +116,11 @@ failure.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBbio\fR\|(7)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2019\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,112 +53,53 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_READBUFFER 3ossl"
|
||||
.TH BIO_F_READBUFFER 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_F_READBUFFER 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_f_readbuffer
|
||||
\&\- read only buffering BIO that supports BIO_tell() and BIO_seek()
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
\&
|
||||
\& const BIO_METHOD *BIO_f_readbuffer(void);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_readbuffer()\fR returns the read buffering \s-1BIO\s0 method.
|
||||
\&\fBBIO_f_readbuffer()\fR returns the read buffering BIO method.
|
||||
.PP
|
||||
This \s-1BIO\s0 filter can be inserted on top of \s-1BIO\s0's that do not support \fBBIO_tell()\fR
|
||||
or \fBBIO_seek()\fR (e.g. A file \s-1BIO\s0 that uses stdin).
|
||||
This BIO filter can be inserted on top of BIO\*(Aqs that do not support \fBBIO_tell()\fR
|
||||
or \fBBIO_seek()\fR (e.g. A file BIO that uses stdin).
|
||||
.PP
|
||||
Data read from a read buffering \s-1BIO\s0 comes from an internal buffer which is
|
||||
filled from the next \s-1BIO\s0 in the chain.
|
||||
Data read from a read buffering BIO comes from an internal buffer which is
|
||||
filled from the next BIO in the chain.
|
||||
.PP
|
||||
\&\fBBIO_gets()\fR is supported for read buffering BIOs.
|
||||
Writing data to a read buffering \s-1BIO\s0 is not supported.
|
||||
Writing data to a read buffering BIO is not supported.
|
||||
.PP
|
||||
Calling \fBBIO_reset()\fR on a read buffering \s-1BIO\s0 does not clear any buffered data.
|
||||
.SH "NOTES"
|
||||
Calling \fBBIO_reset()\fR on a read buffering BIO does not clear any buffered data.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Read buffering BIOs implement \fBBIO_read_ex()\fR by using \fBBIO_read_ex()\fR operations
|
||||
on the next \s-1BIO\s0 (e.g. a file \s-1BIO\s0) in the chain and storing the result in an
|
||||
on the next BIO (e.g. a file BIO) in the chain and storing the result in an
|
||||
internal buffer, from which bytes are given back to the caller as appropriate
|
||||
for the call. \fBBIO_read_ex()\fR is guaranteed to give the caller the number of bytes
|
||||
it asks for, unless there's an error or end of communication is reached in the
|
||||
next \s-1BIO.\s0 The internal buffer can grow to cache the entire contents of the next
|
||||
\&\s-1BIO\s0 in the chain. \fBBIO_seek()\fR uses the internal buffer, so that it can only seek
|
||||
it asks for, unless there\*(Aqs an error or end of communication is reached in the
|
||||
next BIO. The internal buffer can grow to cache the entire contents of the next
|
||||
BIO in the chain. \fBBIO_seek()\fR uses the internal buffer, so that it can only seek
|
||||
into data that is already read.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_f_readbuffer()\fR returns the read buffering \s-1BIO\s0 method.
|
||||
\&\fBBIO_f_readbuffer()\fR returns the read buffering BIO method.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBbio\fR\|(7),
|
||||
|
|
@ -182,11 +107,11 @@ into data that is already read.
|
|||
\&\fBBIO_gets\fR\|(3),
|
||||
\&\fBBIO_reset\fR\|(3),
|
||||
\&\fBBIO_ctrl\fR\|(3).
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,83 +53,24 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_SSL 3ossl"
|
||||
.TH BIO_F_SSL 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_F_SSL 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_do_handshake,
|
||||
BIO_f_ssl, BIO_set_ssl, BIO_get_ssl, BIO_set_ssl_mode,
|
||||
BIO_set_ssl_renegotiate_bytes,
|
||||
BIO_get_num_renegotiates, BIO_set_ssl_renegotiate_timeout, BIO_new_ssl,
|
||||
BIO_new_ssl_connect, BIO_new_buffer_ssl_connect, BIO_ssl_copy_session_id,
|
||||
BIO_ssl_shutdown \- SSL BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -168,94 +93,94 @@ BIO_ssl_shutdown \- SSL BIO
|
|||
\&
|
||||
\& long BIO_do_handshake(BIO *b);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_ssl()\fR returns the \s-1SSL BIO\s0 method. This is a filter \s-1BIO\s0 which
|
||||
is a wrapper round the OpenSSL \s-1SSL\s0 routines adding a \s-1BIO\s0 \*(L"flavour\*(R" to
|
||||
\&\s-1SSL I/O.\s0
|
||||
\&\fBBIO_f_ssl()\fR returns the SSL BIO method. This is a filter BIO which
|
||||
is a wrapper round the OpenSSL SSL routines adding a BIO "flavour" to
|
||||
SSL I/O.
|
||||
.PP
|
||||
I/O performed on an \s-1SSL BIO\s0 communicates using the \s-1SSL\s0 protocol with
|
||||
the SSLs read and write BIOs. If an \s-1SSL\s0 connection is not established
|
||||
I/O performed on an SSL BIO communicates using the SSL protocol with
|
||||
the SSLs read and write BIOs. If an SSL connection is not established
|
||||
then an attempt is made to establish one on the first I/O call.
|
||||
.PP
|
||||
If a \s-1BIO\s0 is appended to an \s-1SSL BIO\s0 using \fBBIO_push()\fR it is automatically
|
||||
used as the \s-1SSL\s0 BIOs read and write BIOs.
|
||||
If a BIO is appended to an SSL BIO using \fBBIO_push()\fR it is automatically
|
||||
used as the SSL BIOs read and write BIOs.
|
||||
.PP
|
||||
Calling \fBBIO_reset()\fR on an \s-1SSL BIO\s0 closes down any current \s-1SSL\s0 connection
|
||||
by calling \fBSSL_shutdown()\fR. \fBBIO_reset()\fR is then sent to the next \s-1BIO\s0 in
|
||||
Calling \fBBIO_reset()\fR on an SSL BIO closes down any current SSL connection
|
||||
by calling \fBSSL_shutdown()\fR. \fBBIO_reset()\fR is then sent to the next BIO in
|
||||
the chain: this will typically disconnect the underlying transport.
|
||||
The \s-1SSL BIO\s0 is then reset to the initial accept or connect state.
|
||||
The SSL BIO is then reset to the initial accept or connect state.
|
||||
.PP
|
||||
If the close flag is set when an \s-1SSL BIO\s0 is freed then the internal
|
||||
\&\s-1SSL\s0 structure is also freed using \fBSSL_free()\fR.
|
||||
If the close flag is set when an SSL BIO is freed then the internal
|
||||
SSL structure is also freed using \fBSSL_free()\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_ssl()\fR sets the internal \s-1SSL\s0 pointer of \s-1SSL BIO\s0 \fBb\fR to \fBssl\fR using
|
||||
\&\fBBIO_set_ssl()\fR sets the internal SSL pointer of SSL BIO \fBb\fR to \fBssl\fR using
|
||||
the close flag \fBc\fR.
|
||||
.PP
|
||||
\&\fBBIO_get_ssl()\fR retrieves the \s-1SSL\s0 pointer of \s-1SSL BIO\s0 \fBb\fR, it can then be
|
||||
manipulated using the standard \s-1SSL\s0 library functions.
|
||||
\&\fBBIO_get_ssl()\fR retrieves the SSL pointer of SSL BIO \fBb\fR, it can then be
|
||||
manipulated using the standard SSL library functions.
|
||||
.PP
|
||||
\&\fBBIO_set_ssl_mode()\fR sets the \s-1SSL BIO\s0 mode to \fBclient\fR. If \fBclient\fR
|
||||
\&\fBBIO_set_ssl_mode()\fR sets the SSL BIO mode to \fBclient\fR. If \fBclient\fR
|
||||
is 1 client mode is set. If \fBclient\fR is 0 server mode is set.
|
||||
.PP
|
||||
\&\fBBIO_set_ssl_renegotiate_bytes()\fR sets the renegotiate byte count of \s-1SSL BIO\s0 \fBb\fR
|
||||
\&\fBBIO_set_ssl_renegotiate_bytes()\fR sets the renegotiate byte count of SSL BIO \fBb\fR
|
||||
to \fBnum\fR. When set after every \fBnum\fR bytes of I/O (read and write)
|
||||
the \s-1SSL\s0 session is automatically renegotiated. \fBnum\fR must be at
|
||||
the SSL session is automatically renegotiated. \fBnum\fR must be at
|
||||
least 512 bytes.
|
||||
.PP
|
||||
\&\fBBIO_set_ssl_renegotiate_timeout()\fR sets the renegotiate timeout of \s-1SSL BIO\s0 \fBb\fR
|
||||
\&\fBBIO_set_ssl_renegotiate_timeout()\fR sets the renegotiate timeout of SSL BIO \fBb\fR
|
||||
to \fBseconds\fR.
|
||||
When the renegotiate timeout elapses the session is automatically renegotiated.
|
||||
.PP
|
||||
\&\fBBIO_get_num_renegotiates()\fR returns the total number of session
|
||||
renegotiations due to I/O or timeout of \s-1SSL BIO\s0 \fBb\fR.
|
||||
renegotiations due to I/O or timeout of SSL BIO \fBb\fR.
|
||||
.PP
|
||||
\&\fBBIO_new_ssl()\fR allocates an \s-1SSL BIO\s0 using \s-1SSL_CTX\s0 \fBctx\fR and using
|
||||
\&\fBBIO_new_ssl()\fR allocates an SSL BIO using SSL_CTX \fBctx\fR and using
|
||||
client mode if \fBclient\fR is non zero.
|
||||
.PP
|
||||
\&\fBBIO_new_ssl_connect()\fR creates a new \s-1BIO\s0 chain consisting of an
|
||||
\&\s-1SSL BIO\s0 (using \fBctx\fR) followed by a connect \s-1BIO.\s0
|
||||
\&\fBBIO_new_ssl_connect()\fR creates a new BIO chain consisting of an
|
||||
SSL BIO (using \fBctx\fR) followed by a connect BIO.
|
||||
.PP
|
||||
\&\fBBIO_new_buffer_ssl_connect()\fR creates a new \s-1BIO\s0 chain consisting
|
||||
of a buffering \s-1BIO,\s0 an \s-1SSL BIO\s0 (using \fBctx\fR), and a connect \s-1BIO.\s0
|
||||
\&\fBBIO_new_buffer_ssl_connect()\fR creates a new BIO chain consisting
|
||||
of a buffering BIO, an SSL BIO (using \fBctx\fR), and a connect BIO.
|
||||
.PP
|
||||
\&\fBBIO_ssl_copy_session_id()\fR copies an \s-1SSL\s0 session id between
|
||||
\&\s-1BIO\s0 chains \fBfrom\fR and \fBto\fR. It does this by locating the
|
||||
\&\s-1SSL\s0 BIOs in each chain and calling \fBSSL_copy_session_id()\fR on
|
||||
the internal \s-1SSL\s0 pointer.
|
||||
\&\fBBIO_ssl_copy_session_id()\fR copies an SSL session id between
|
||||
BIO chains \fBfrom\fR and \fBto\fR. It does this by locating the
|
||||
SSL BIOs in each chain and calling \fBSSL_copy_session_id()\fR on
|
||||
the internal SSL pointer.
|
||||
.PP
|
||||
\&\fBBIO_ssl_shutdown()\fR closes down an \s-1SSL\s0 connection on \s-1BIO\s0
|
||||
chain \fBbio\fR. It does this by locating the \s-1SSL BIO\s0 in the
|
||||
chain and calling \fBSSL_shutdown()\fR on its internal \s-1SSL\s0
|
||||
\&\fBBIO_ssl_shutdown()\fR closes down an SSL connection on BIO
|
||||
chain \fBbio\fR. It does this by locating the SSL BIO in the
|
||||
chain and calling \fBSSL_shutdown()\fR on its internal SSL
|
||||
pointer.
|
||||
.PP
|
||||
\&\fBBIO_do_handshake()\fR attempts to complete an \s-1SSL\s0 handshake on the
|
||||
supplied \s-1BIO\s0 and establish the \s-1SSL\s0 connection.
|
||||
For non-SSL BIOs the connection is done typically at \s-1TCP\s0 level.
|
||||
If domain name resolution yields multiple \s-1IP\s0 addresses all of them are tried
|
||||
\&\fBBIO_do_handshake()\fR attempts to complete an SSL handshake on the
|
||||
supplied BIO and establish the SSL connection.
|
||||
For non\-SSL BIOs the connection is done typically at TCP level.
|
||||
If domain name resolution yields multiple IP addresses all of them are tried
|
||||
after \fBconnect()\fR failures.
|
||||
The function returns 1 if the connection was established successfully.
|
||||
A zero or negative value is returned if the connection could not be established.
|
||||
The call \fBBIO_should_retry()\fR should be used for nonblocking connect BIOs
|
||||
to determine if the call should be retried.
|
||||
If a connection has already been established this call has no effect.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
\&\s-1SSL\s0 BIOs are exceptional in that if the underlying transport
|
||||
SSL BIOs are exceptional in that if the underlying transport
|
||||
is non blocking they can still request a retry in exceptional
|
||||
circumstances. Specifically this will happen if a session
|
||||
renegotiation takes place during a \fBBIO_read_ex()\fR operation, one
|
||||
case where this happens is when step up occurs.
|
||||
.PP
|
||||
The \s-1SSL\s0 flag \s-1SSL_AUTO_RETRY\s0 can be
|
||||
The SSL flag SSL_AUTO_RETRY can be
|
||||
set to disable this behaviour. That is when this flag is set
|
||||
an \s-1SSL BIO\s0 using a blocking transport will never request a
|
||||
an SSL BIO using a blocking transport will never request a
|
||||
retry.
|
||||
.PP
|
||||
Since unknown \fBBIO_ctrl()\fR operations are sent through filter
|
||||
BIOs the servers name and port can be set using \fBBIO_set_host()\fR
|
||||
on the \s-1BIO\s0 returned by \fBBIO_new_ssl_connect()\fR without having
|
||||
to locate the connect \s-1BIO\s0 first.
|
||||
on the BIO returned by \fBBIO_new_ssl_connect()\fR without having
|
||||
to locate the connect BIO first.
|
||||
.PP
|
||||
Applications do not have to call \fBBIO_do_handshake()\fR but may wish
|
||||
to do so to separate the handshake process from other I/O
|
||||
|
|
@ -266,23 +191,23 @@ processing.
|
|||
\&\fBBIO_get_num_renegotiates()\fR, and \fBBIO_do_handshake()\fR are implemented as macros.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_f_ssl()\fR returns the \s-1SSL\s0 \fB\s-1BIO_METHOD\s0\fR structure.
|
||||
\&\fBBIO_f_ssl()\fR returns the SSL \fBBIO_METHOD\fR structure.
|
||||
.PP
|
||||
\&\fBBIO_set_ssl()\fR, \fBBIO_get_ssl()\fR, \fBBIO_set_ssl_mode()\fR, \fBBIO_set_ssl_renegotiate_bytes()\fR,
|
||||
\&\fBBIO_set_ssl_renegotiate_timeout()\fR and \fBBIO_get_num_renegotiates()\fR return 1 on
|
||||
success or a value which is less than or equal to 0 if an error occurred.
|
||||
.PP
|
||||
\&\fBBIO_new_ssl()\fR, \fBBIO_new_ssl_connect()\fR and \fBBIO_new_buffer_ssl_connect()\fR return
|
||||
a valid \fB\s-1BIO\s0\fR structure on success or \fB\s-1NULL\s0\fR if an error occurred.
|
||||
a valid \fBBIO\fR structure on success or \fBNULL\fR if an error occurred.
|
||||
.PP
|
||||
\&\fBBIO_ssl_copy_session_id()\fR returns 1 on success or 0 on error.
|
||||
.PP
|
||||
\&\fBBIO_do_handshake()\fR returns 1 if the connection was established successfully.
|
||||
A zero or negative value is returned if the connection could not be established.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
This \s-1SSL/TLS\s0 client example attempts to retrieve a page from an
|
||||
\&\s-1SSL/TLS\s0 web server. The I/O routines are identical to those of the
|
||||
This SSL/TLS client example attempts to retrieve a page from an
|
||||
SSL/TLS web server. The I/O routines are identical to those of the
|
||||
unencrypted example in \fBBIO_s_connect\fR\|(3).
|
||||
.PP
|
||||
.Vb 5
|
||||
|
|
@ -332,7 +257,7 @@ unencrypted example in \fBBIO_s_connect\fR\|(3).
|
|||
.Ve
|
||||
.PP
|
||||
Here is a simple server example. It makes use of a buffering
|
||||
\&\s-1BIO\s0 to allow lines to be read from the \s-1SSL BIO\s0 using BIO_gets.
|
||||
BIO to allow lines to be read from the SSL BIO using BIO_gets.
|
||||
It creates a pseudo web page containing the actual request from
|
||||
a client and also echoes the request to standard output.
|
||||
.PP
|
||||
|
|
@ -388,7 +313,7 @@ a client and also echoes the request to standard output.
|
|||
.PP
|
||||
/* Second call to \fBBIO_do_accept()\fR waits for incoming connection */
|
||||
if (BIO_do_accept(acpt) <= 0) {
|
||||
fprintf(stderr, \*(L"Error accepting connection\en\*(R");
|
||||
fprintf(stderr, "Error accepting connection\en");
|
||||
ERR_print_errors_fp(stderr);
|
||||
\fBexit\fR\|(1);
|
||||
}
|
||||
|
|
@ -424,19 +349,19 @@ a client and also echoes the request to standard output.
|
|||
\& BIO_flush(sbio);
|
||||
\& BIO_free_all(sbio);
|
||||
.Ve
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
In OpenSSL before 1.0.0 the \fBBIO_pop()\fR call was handled incorrectly,
|
||||
the I/O \s-1BIO\s0 reference count was incorrectly incremented (instead of
|
||||
decremented) and dissociated with the \s-1SSL BIO\s0 even if the \s-1SSL BIO\s0 was not
|
||||
the I/O BIO reference count was incorrectly incremented (instead of
|
||||
decremented) and dissociated with the SSL BIO even if the SSL BIO was not
|
||||
explicitly being popped (e.g. a pop higher up the chain). Applications which
|
||||
included workarounds for this bug (e.g. freeing BIOs more than once) should
|
||||
be modified to handle this fix or they may free up an already freed \s-1BIO.\s0
|
||||
.SH "COPYRIGHT"
|
||||
be modified to handle this fix or they may free up an already freed BIO.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_FIND_TYPE 3ossl"
|
||||
.TH BIO_FIND_TYPE 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_FIND_TYPE 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_find_type, BIO_next, BIO_method_type \- BIO chain traversal
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -149,33 +74,33 @@ BIO_find_type, BIO_next, BIO_method_type \- BIO chain traversal
|
|||
\& BIO *BIO_next(BIO *b);
|
||||
\& int BIO_method_type(const BIO *b);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fBBIO_find_type()\fR searches for a \s-1BIO\s0 of a given type in a chain, starting
|
||||
at \s-1BIO\s0 \fBb\fR. If \fBtype\fR is a specific type (such as \fB\s-1BIO_TYPE_MEM\s0\fR) then a search
|
||||
is made for a \s-1BIO\s0 of that type. If \fBtype\fR is a general type (such as
|
||||
\&\fB\s-1BIO_TYPE_SOURCE_SINK\s0\fR) then the next matching \s-1BIO\s0 of the given general type is
|
||||
searched for. \fBBIO_find_type()\fR returns the next matching \s-1BIO\s0 or \s-1NULL\s0 if none is
|
||||
The \fBBIO_find_type()\fR searches for a BIO of a given type in a chain, starting
|
||||
at BIO \fBb\fR. If \fBtype\fR is a specific type (such as \fBBIO_TYPE_MEM\fR) then a search
|
||||
is made for a BIO of that type. If \fBtype\fR is a general type (such as
|
||||
\&\fBBIO_TYPE_SOURCE_SINK\fR) then the next matching BIO of the given general type is
|
||||
searched for. \fBBIO_find_type()\fR returns the next matching BIO or NULL if none is
|
||||
found.
|
||||
.PP
|
||||
The following general types are defined:
|
||||
\&\fB\s-1BIO_TYPE_DESCRIPTOR\s0\fR, \fB\s-1BIO_TYPE_FILTER\s0\fR, and \fB\s-1BIO_TYPE_SOURCE_SINK\s0\fR.
|
||||
\&\fBBIO_TYPE_DESCRIPTOR\fR, \fBBIO_TYPE_FILTER\fR, and \fBBIO_TYPE_SOURCE_SINK\fR.
|
||||
.PP
|
||||
For a list of the specific types, see the \fI<openssl/bio.h>\fR header file.
|
||||
.PP
|
||||
\&\fBBIO_next()\fR returns the next \s-1BIO\s0 in a chain. It can be used to traverse all BIOs
|
||||
\&\fBBIO_next()\fR returns the next BIO in a chain. It can be used to traverse all BIOs
|
||||
in a chain or used in conjunction with \fBBIO_find_type()\fR to find all BIOs of a
|
||||
certain type.
|
||||
.PP
|
||||
\&\fBBIO_method_type()\fR returns the type of a \s-1BIO.\s0
|
||||
\&\fBBIO_method_type()\fR returns the type of a BIO.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_find_type()\fR returns a matching \s-1BIO\s0 or \s-1NULL\s0 for no match.
|
||||
\&\fBBIO_find_type()\fR returns a matching BIO or NULL for no match.
|
||||
.PP
|
||||
\&\fBBIO_next()\fR returns the next \s-1BIO\s0 in a chain.
|
||||
\&\fBBIO_next()\fR returns the next BIO in a chain.
|
||||
.PP
|
||||
\&\fBBIO_method_type()\fR returns the type of the \s-1BIO\s0 \fBb\fR.
|
||||
.SH "EXAMPLES"
|
||||
\&\fBBIO_method_type()\fR returns the type of the BIO \fBb\fR.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
Traverse a chain looking for digest BIOs:
|
||||
.PP
|
||||
|
|
@ -193,11 +118,11 @@ Traverse a chain looking for digest BIOs:
|
|||
\& btmp = BIO_next(btmp);
|
||||
\& } while (btmp);
|
||||
.Ve
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_GET_DATA 3ossl"
|
||||
.TH BIO_GET_DATA 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_GET_DATA 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_set_data, BIO_get_data, BIO_set_init, BIO_get_init, BIO_set_shutdown,
|
||||
BIO_get_shutdown \- functions for managing BIO state information
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -153,44 +78,44 @@ BIO_get_shutdown \- functions for managing BIO state information
|
|||
\& void BIO_set_shutdown(BIO *a, int shut);
|
||||
\& int BIO_get_shutdown(BIO *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions are mainly useful when implementing a custom \s-1BIO.\s0
|
||||
These functions are mainly useful when implementing a custom BIO.
|
||||
.PP
|
||||
The \fBBIO_set_data()\fR function associates the custom data pointed to by \fBptr\fR with
|
||||
the \s-1BIO.\s0 This data can subsequently be retrieved via a call to \fBBIO_get_data()\fR.
|
||||
the BIO. This data can subsequently be retrieved via a call to \fBBIO_get_data()\fR.
|
||||
This can be used by custom BIOs for storing implementation specific information.
|
||||
.PP
|
||||
The \fBBIO_set_init()\fR function sets the value of the \s-1BIO\s0's \*(L"init\*(R" flag to indicate
|
||||
whether initialisation has been completed for this \s-1BIO\s0 or not. A nonzero value
|
||||
The \fBBIO_set_init()\fR function sets the value of the BIO\*(Aqs "init" flag to indicate
|
||||
whether initialisation has been completed for this BIO or not. A nonzero value
|
||||
indicates that initialisation is complete, whilst zero indicates that it is not.
|
||||
Often initialisation will complete during initial construction of the \s-1BIO.\s0 For
|
||||
Often initialisation will complete during initial construction of the BIO. For
|
||||
some BIOs however, initialisation may not complete until after additional steps
|
||||
have occurred (for example through calling custom ctrls). The \fBBIO_get_init()\fR
|
||||
function returns the value of the \*(L"init\*(R" flag.
|
||||
function returns the value of the "init" flag.
|
||||
.PP
|
||||
The \fBBIO_set_shutdown()\fR and \fBBIO_get_shutdown()\fR functions set and get the state of
|
||||
this \s-1BIO\s0's shutdown (i.e. \s-1BIO_CLOSE\s0) flag. If set then the underlying resource
|
||||
is also closed when the \s-1BIO\s0 is freed.
|
||||
this BIO\*(Aqs shutdown (i.e. BIO_CLOSE) flag. If set then the underlying resource
|
||||
is also closed when the BIO is freed.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_get_data()\fR returns a pointer to the implementation specific custom data
|
||||
associated with this \s-1BIO,\s0 or \s-1NULL\s0 if none has been set.
|
||||
associated with this BIO, or NULL if none has been set.
|
||||
.PP
|
||||
\&\fBBIO_get_init()\fR returns the state of the \s-1BIO\s0's init flag.
|
||||
\&\fBBIO_get_init()\fR returns the state of the BIO\*(Aqs init flag.
|
||||
.PP
|
||||
\&\fBBIO_get_shutdown()\fR returns the stat of the \s-1BIO\s0's shutdown (i.e. \s-1BIO_CLOSE\s0) flag.
|
||||
\&\fBBIO_get_shutdown()\fR returns the stat of the BIO\*(Aqs shutdown (i.e. BIO_CLOSE) flag.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBbio\fR\|(7), \fBBIO_meth_new\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The functions described here were added in OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_GET_EX_NEW_INDEX 3ossl"
|
||||
.TH BIO_GET_EX_NEW_INDEX 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_GET_EX_NEW_INDEX 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_get_ex_new_index, BIO_set_ex_data, BIO_get_ex_data,
|
||||
BIO_set_app_data, BIO_get_app_data,
|
||||
DH_get_ex_new_index, DH_set_ex_data, DH_get_ex_data,
|
||||
|
|
@ -161,7 +86,7 @@ X509_STORE_CTX_set_app_data, X509_STORE_CTX_get_app_data,
|
|||
X509_STORE_get_ex_new_index, X509_STORE_set_ex_data, X509_STORE_get_ex_data,
|
||||
X509_get_ex_new_index, X509_set_ex_data, X509_get_ex_data
|
||||
\&\- application\-specific data
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/x509.h>
|
||||
|
|
@ -180,7 +105,7 @@ X509_get_ex_new_index, X509_set_ex_data, X509_get_ex_data
|
|||
.Ve
|
||||
.PP
|
||||
The following functions have been deprecated since OpenSSL 3.0, and can be
|
||||
hidden entirely by defining \fB\s-1OPENSSL_API_COMPAT\s0\fR with a suitable version value,
|
||||
hidden entirely by defining \fBOPENSSL_API_COMPAT\fR with a suitable version value,
|
||||
see \fBopenssl_user_macros\fR\|(7):
|
||||
.PP
|
||||
.Vb 10
|
||||
|
|
@ -207,32 +132,32 @@ see \fBopenssl_user_macros\fR\|(7):
|
|||
\& int ENGINE_set_ex_data(ENGINE *type, int idx, void *arg);
|
||||
\& void *ENGINE_get_ex_data(ENGINE *type, int idx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
In the description here, \fI\s-1TYPE\s0\fR is used a placeholder
|
||||
In the description here, \fITYPE\fR is used a placeholder
|
||||
for any of the OpenSSL datatypes listed in \fBCRYPTO_get_ex_new_index\fR\|(3).
|
||||
.PP
|
||||
All functions with a \fI\s-1TYPE\s0\fR of \fB\s-1DH\s0\fR, \fB\s-1DSA\s0\fR, \fB\s-1RSA\s0\fR and \fB\s-1EC_KEY\s0\fR are deprecated.
|
||||
All functions with a \fITYPE\fR of \fBDH\fR, \fBDSA\fR, \fBRSA\fR and \fBEC_KEY\fR are deprecated.
|
||||
Applications should instead use \fBEVP_PKEY_set_ex_data()\fR,
|
||||
\&\fBEVP_PKEY_get_ex_data()\fR and \fBEVP_PKEY_get_ex_new_index()\fR.
|
||||
.PP
|
||||
All functions with a \fI\s-1TYPE\s0\fR of \fB\s-1ENGINE\s0\fR are deprecated.
|
||||
All functions with a \fITYPE\fR of \fBENGINE\fR are deprecated.
|
||||
Applications using engines should be replaced by providers.
|
||||
.PP
|
||||
These functions handle application-specific data for OpenSSL data
|
||||
These functions handle application\-specific data for OpenSSL data
|
||||
structures.
|
||||
.PP
|
||||
\&\fBTYPE_get_ex_new_index()\fR is a macro that calls \fBCRYPTO_get_ex_new_index()\fR
|
||||
with the correct \fBindex\fR value.
|
||||
.PP
|
||||
\&\fBTYPE_set_ex_data()\fR is a function that calls \fBCRYPTO_set_ex_data()\fR with
|
||||
an offset into the opaque exdata part of the \s-1TYPE\s0 object.
|
||||
an offset into the opaque exdata part of the TYPE object.
|
||||
.PP
|
||||
\&\fBTYPE_get_ex_data()\fR is a function that calls \fBCRYPTO_get_ex_data()\fR with
|
||||
an offset into the opaque exdata part of the \s-1TYPE\s0 object.
|
||||
an offset into the opaque exdata part of the TYPE object.
|
||||
.PP
|
||||
For compatibility with previous releases, the exdata index of zero is
|
||||
reserved for \*(L"application data.\*(R" There are two convenience functions for
|
||||
reserved for "application data." There are two convenience functions for
|
||||
this.
|
||||
\&\fBTYPE_set_app_data()\fR is a macro that invokes \fBTYPE_set_ex_data()\fR with
|
||||
\&\fBidx\fR set to zero.
|
||||
|
|
@ -244,11 +169,11 @@ this.
|
|||
.PP
|
||||
\&\fBTYPE_set_ex_data()\fR returns 1 on success or 0 on error.
|
||||
.PP
|
||||
\&\fBTYPE_get_ex_data()\fR returns the application data or \s-1NULL\s0 if an error occurred.
|
||||
\&\fBTYPE_get_ex_data()\fR returns the application data or NULL if an error occurred.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBCRYPTO_get_ex_new_index\fR\|(3).
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The functions \fBDH_get_ex_new_index()\fR, \fBDH_set_ex_data()\fR, \fBDH_get_ex_data()\fR,
|
||||
\&\fBDSA_get_ex_new_index()\fR, \fBDSA_set_ex_data()\fR, \fBDSA_get_ex_data()\fR,
|
||||
|
|
@ -256,11 +181,11 @@ The functions \fBDH_get_ex_new_index()\fR, \fBDH_set_ex_data()\fR, \fBDH_get_ex_
|
|||
\&\fBENGINE_get_ex_new_index()\fR, \fBENGINE_set_ex_data()\fR, \fBENGINE_get_ex_data()\fR,
|
||||
\&\fBRSA_get_ex_new_index()\fR, \fBRSA_set_ex_data()\fR, \fBRSA_get_ex_data()\fR,
|
||||
\&\fBRSA_set_app_data()\fR and \fBRSA_get_app_data()\fR were deprecated in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2015\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_METH_NEW 3ossl"
|
||||
.TH BIO_METH_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_METH_NEW 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_get_new_index,
|
||||
BIO_meth_new, BIO_meth_free, BIO_meth_get_read_ex, BIO_meth_set_read_ex,
|
||||
BIO_meth_get_write_ex, BIO_meth_set_write_ex, BIO_meth_get_write,
|
||||
|
|
@ -147,7 +72,7 @@ BIO_meth_set_puts, BIO_meth_get_gets, BIO_meth_set_gets, BIO_meth_get_ctrl,
|
|||
BIO_meth_set_ctrl, BIO_meth_get_create, BIO_meth_set_create,
|
||||
BIO_meth_get_destroy, BIO_meth_set_destroy, BIO_meth_get_callback_ctrl,
|
||||
BIO_meth_set_callback_ctrl \- Routines to build up BIO methods
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -193,30 +118,30 @@ BIO_meth_set_callback_ctrl \- Routines to build up BIO methods
|
|||
\& int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
|
||||
\& long (*callback_ctrl)(BIO *, int, BIO_info_cb *));
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fB\s-1BIO_METHOD\s0\fR type is a structure used for the implementation of new \s-1BIO\s0
|
||||
The \fBBIO_METHOD\fR type is a structure used for the implementation of new BIO
|
||||
types. It provides a set of functions used by OpenSSL for the implementation
|
||||
of the various \s-1BIO\s0 capabilities. See the \fBbio\fR\|(7) page for more information.
|
||||
of the various BIO capabilities. See the \fBbio\fR\|(7) page for more information.
|
||||
.PP
|
||||
\&\fBBIO_meth_new()\fR creates a new \fB\s-1BIO_METHOD\s0\fR structure. It should be given a
|
||||
\&\fBBIO_meth_new()\fR creates a new \fBBIO_METHOD\fR structure. It should be given a
|
||||
unique integer \fBtype\fR and a string that represents its \fBname\fR.
|
||||
Use \fBBIO_get_new_index()\fR to get the value for \fBtype\fR.
|
||||
.PP
|
||||
The set of
|
||||
standard OpenSSL provided \s-1BIO\s0 types is provided in \fI<openssl/bio.h>\fR.
|
||||
Some examples include \fB\s-1BIO_TYPE_BUFFER\s0\fR and \fB\s-1BIO_TYPE_CIPHER\s0\fR. Filter BIOs
|
||||
should have a type which have the \*(L"filter\*(R" bit set (\fB\s-1BIO_TYPE_FILTER\s0\fR).
|
||||
Source/sink BIOs should have the \*(L"source/sink\*(R" bit set (\fB\s-1BIO_TYPE_SOURCE_SINK\s0\fR).
|
||||
standard OpenSSL provided BIO types is provided in \fI<openssl/bio.h>\fR.
|
||||
Some examples include \fBBIO_TYPE_BUFFER\fR and \fBBIO_TYPE_CIPHER\fR. Filter BIOs
|
||||
should have a type which have the "filter" bit set (\fBBIO_TYPE_FILTER\fR).
|
||||
Source/sink BIOs should have the "source/sink" bit set (\fBBIO_TYPE_SOURCE_SINK\fR).
|
||||
File descriptor based BIOs (e.g. socket, fd, connect, accept etc) should
|
||||
additionally have the \*(L"descriptor\*(R" bit set (\fB\s-1BIO_TYPE_DESCRIPTOR\s0\fR). See the
|
||||
additionally have the "descriptor" bit set (\fBBIO_TYPE_DESCRIPTOR\fR). See the
|
||||
\&\fBBIO_find_type\fR\|(3) page for more information.
|
||||
.PP
|
||||
\&\fBBIO_meth_free()\fR destroys a \fB\s-1BIO_METHOD\s0\fR structure and frees up any memory
|
||||
associated with it.
|
||||
\&\fBBIO_meth_free()\fR destroys a \fBBIO_METHOD\fR structure and frees up any memory
|
||||
associated with it. If the argument is NULL, nothing is done.
|
||||
.PP
|
||||
\&\fBBIO_meth_get_write_ex()\fR and \fBBIO_meth_set_write_ex()\fR get and set the function
|
||||
used for writing arbitrary length data to the \s-1BIO\s0 respectively. This function
|
||||
used for writing arbitrary length data to the BIO respectively. This function
|
||||
will be called in response to the application calling \fBBIO_write_ex()\fR or
|
||||
\&\fBBIO_write()\fR. The parameters for the function have the same meaning as for
|
||||
\&\fBBIO_write_ex()\fR. Older code may call \fBBIO_meth_get_write()\fR and
|
||||
|
|
@ -225,7 +150,7 @@ will be called in response to the application calling \fBBIO_write_ex()\fR or
|
|||
when the function was set with \fBBIO_meth_set_write_ex()\fR.
|
||||
.PP
|
||||
\&\fBBIO_meth_get_read_ex()\fR and \fBBIO_meth_set_read_ex()\fR get and set the function used
|
||||
for reading arbitrary length data from the \s-1BIO\s0 respectively. This function will
|
||||
for reading arbitrary length data from the BIO respectively. This function will
|
||||
be called in response to the application calling \fBBIO_read_ex()\fR or \fBBIO_read()\fR.
|
||||
The parameters for the function have the same meaning as for \fBBIO_read_ex()\fR.
|
||||
Older code may call \fBBIO_meth_get_read()\fR and \fBBIO_meth_set_read()\fR instead.
|
||||
|
|
@ -234,49 +159,49 @@ or call \fBBIO_meth_get_read()\fR when the function was set with
|
|||
\&\fBBIO_meth_set_read_ex()\fR.
|
||||
.PP
|
||||
\&\fBBIO_meth_get_puts()\fR and \fBBIO_meth_set_puts()\fR get and set the function used for
|
||||
writing a \s-1NULL\s0 terminated string to the \s-1BIO\s0 respectively. This function will be
|
||||
writing a NULL terminated string to the BIO respectively. This function will be
|
||||
called in response to the application calling \fBBIO_puts()\fR. The parameters for
|
||||
the function have the same meaning as for \fBBIO_puts()\fR.
|
||||
.PP
|
||||
\&\fBBIO_meth_get_gets()\fR and \fBBIO_meth_set_gets()\fR get and set the function typically
|
||||
used for reading a line of data from the \s-1BIO\s0 respectively (see the \fBBIO_gets\fR\|(3)
|
||||
used for reading a line of data from the BIO respectively (see the \fBBIO_gets\fR\|(3)
|
||||
page for more information). This function will be called in response to the
|
||||
application calling \fBBIO_gets()\fR. The parameters for the function have the same
|
||||
meaning as for \fBBIO_gets()\fR.
|
||||
.PP
|
||||
\&\fBBIO_meth_get_ctrl()\fR and \fBBIO_meth_set_ctrl()\fR get and set the function used for
|
||||
processing ctrl messages in the \s-1BIO\s0 respectively. See the \fBBIO_ctrl\fR\|(3) page for
|
||||
processing ctrl messages in the BIO respectively. See the \fBBIO_ctrl\fR\|(3) page for
|
||||
more information. This function will be called in response to the application
|
||||
calling \fBBIO_ctrl()\fR. The parameters for the function have the same meaning as for
|
||||
\&\fBBIO_ctrl()\fR.
|
||||
.PP
|
||||
\&\fBBIO_meth_get_create()\fR and \fBBIO_meth_set_create()\fR get and set the function used
|
||||
for creating a new instance of the \s-1BIO\s0 respectively. This function will be
|
||||
for creating a new instance of the BIO respectively. This function will be
|
||||
called in response to the application calling \fBBIO_new()\fR and passing
|
||||
in a pointer to the current \s-1BIO_METHOD.\s0 The \fBBIO_new()\fR function will allocate the
|
||||
memory for the new \s-1BIO,\s0 and a pointer to this newly allocated structure will
|
||||
in a pointer to the current BIO_METHOD. The \fBBIO_new()\fR function will allocate the
|
||||
memory for the new BIO, and a pointer to this newly allocated structure will
|
||||
be passed as a parameter to the function. If a create function is set,
|
||||
\&\fBBIO_new()\fR will not mark the \s-1BIO\s0 as initialised on allocation.
|
||||
\&\fBBIO_new()\fR will not mark the BIO as initialised on allocation.
|
||||
\&\fBBIO_set_init\fR\|(3) must then be called either by the create function, or later,
|
||||
by a \s-1BIO\s0 ctrl function, once \s-1BIO\s0 initialisation is complete.
|
||||
by a BIO ctrl function, once BIO initialisation is complete.
|
||||
.PP
|
||||
\&\fBBIO_meth_get_destroy()\fR and \fBBIO_meth_set_destroy()\fR get and set the function used
|
||||
for destroying an instance of a \s-1BIO\s0 respectively. This function will be
|
||||
called in response to the application calling \fBBIO_free()\fR. A pointer to the \s-1BIO\s0
|
||||
for destroying an instance of a BIO respectively. This function will be
|
||||
called in response to the application calling \fBBIO_free()\fR. A pointer to the BIO
|
||||
to be destroyed is passed as a parameter. The destroy function should be used
|
||||
for \s-1BIO\s0 specific clean up. The memory for the \s-1BIO\s0 itself should not be freed by
|
||||
for BIO specific clean up. The memory for the BIO itself should not be freed by
|
||||
this function.
|
||||
.PP
|
||||
\&\fBBIO_meth_get_callback_ctrl()\fR and \fBBIO_meth_set_callback_ctrl()\fR get and set the
|
||||
function used for processing callback ctrl messages in the \s-1BIO\s0 respectively. See
|
||||
function used for processing callback ctrl messages in the BIO respectively. See
|
||||
the \fBBIO_callback_ctrl\fR\|(3) page for more information. This function will be called
|
||||
in response to the application calling \fBBIO_callback_ctrl()\fR. The parameters for
|
||||
the function have the same meaning as for \fBBIO_callback_ctrl()\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_get_new_index()\fR returns the new \s-1BIO\s0 type value or \-1 if an error occurred.
|
||||
\&\fBBIO_get_new_index()\fR returns the new BIO type value or \-1 if an error occurred.
|
||||
.PP
|
||||
BIO_meth_new(int type, const char *name) returns a valid \fB\s-1BIO_METHOD\s0\fR or \s-1NULL\s0
|
||||
BIO_meth_new(int type, const char *name) returns a valid \fBBIO_METHOD\fR or NULL
|
||||
if an error occurred.
|
||||
.PP
|
||||
The \fBBIO_meth_set\fR functions return 1 on success or 0 on error.
|
||||
|
|
@ -285,14 +210,14 @@ The \fBBIO_meth_get\fR functions return the corresponding function pointers.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBbio\fR\|(7), \fBBIO_find_type\fR\|(3), \fBBIO_ctrl\fR\|(3), \fBBIO_read_ex\fR\|(3), \fBBIO_new\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The functions described here were added in OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2016\-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2016\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_NEW 3ossl"
|
||||
.TH BIO_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_NEW 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_new_ex, BIO_new, BIO_up_ref, BIO_free, BIO_vfree, BIO_free_all
|
||||
\&\- BIO allocation and freeing functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -153,59 +78,59 @@ BIO_new_ex, BIO_new, BIO_up_ref, BIO_free, BIO_vfree, BIO_free_all
|
|||
\& void BIO_vfree(BIO *a);
|
||||
\& void BIO_free_all(BIO *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fBBIO_new_ex()\fR function returns a new \s-1BIO\s0 using method \fBtype\fR associated with
|
||||
the library context \fIlibctx\fR (see \s-1\fBOSSL_LIB_CTX\s0\fR\|(3)). The library context may be
|
||||
\&\s-1NULL\s0 to indicate the default library context.
|
||||
The \fBBIO_new_ex()\fR function returns a new BIO using method \fBtype\fR associated with
|
||||
the library context \fIlibctx\fR (see \fBOSSL_LIB_CTX\fR\|(3)). The library context may be
|
||||
NULL to indicate the default library context.
|
||||
.PP
|
||||
The \fBBIO_new()\fR is the same as \fBBIO_new_ex()\fR except the default library context is
|
||||
always used.
|
||||
.PP
|
||||
\&\fBBIO_up_ref()\fR increments the reference count associated with the \s-1BIO\s0 object.
|
||||
\&\fBBIO_up_ref()\fR increments the reference count associated with the BIO object.
|
||||
.PP
|
||||
\&\fBBIO_free()\fR frees up a single \s-1BIO,\s0 \fBBIO_vfree()\fR also frees up a single \s-1BIO\s0
|
||||
\&\fBBIO_free()\fR frees up a single BIO, \fBBIO_vfree()\fR also frees up a single BIO
|
||||
but it does not return a value.
|
||||
If \fBa\fR is \s-1NULL\s0 nothing is done.
|
||||
If \fBa\fR is NULL nothing is done.
|
||||
Calling \fBBIO_free()\fR may also have some effect
|
||||
on the underlying I/O structure, for example it may close the file being
|
||||
referred to under certain circumstances. For more details see the individual
|
||||
\&\s-1BIO_METHOD\s0 descriptions.
|
||||
BIO_METHOD descriptions.
|
||||
.PP
|
||||
\&\fBBIO_free_all()\fR frees up an entire \s-1BIO\s0 chain, it does not halt if an error
|
||||
occurs freeing up an individual \s-1BIO\s0 in the chain.
|
||||
If \fBa\fR is \s-1NULL\s0 nothing is done.
|
||||
\&\fBBIO_free_all()\fR frees up an entire BIO chain, it does not halt if an error
|
||||
occurs freeing up an individual BIO in the chain.
|
||||
If \fBa\fR is NULL nothing is done.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_new_ex()\fR and \fBBIO_new()\fR return a newly created \s-1BIO\s0 or \s-1NULL\s0 if the call fails.
|
||||
\&\fBBIO_new_ex()\fR and \fBBIO_new()\fR return a newly created BIO or NULL if the call fails.
|
||||
.PP
|
||||
\&\fBBIO_up_ref()\fR and \fBBIO_free()\fR return 1 for success and 0 for failure.
|
||||
.PP
|
||||
\&\fBBIO_free_all()\fR and \fBBIO_vfree()\fR do not return values.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
If \fBBIO_free()\fR is called on a \s-1BIO\s0 chain it will only free one \s-1BIO\s0 resulting
|
||||
If \fBBIO_free()\fR is called on a BIO chain it will only free one BIO resulting
|
||||
in a memory leak.
|
||||
.PP
|
||||
Calling \fBBIO_free_all()\fR on a single \s-1BIO\s0 has the same effect as calling \fBBIO_free()\fR
|
||||
Calling \fBBIO_free_all()\fR on a single BIO has the same effect as calling \fBBIO_free()\fR
|
||||
on it other than the discarded return value.
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBIO_set()\fR was removed in OpenSSL 1.1.0 as \s-1BIO\s0 type is now opaque.
|
||||
\&\fBBIO_set()\fR was removed in OpenSSL 1.1.0 as BIO type is now opaque.
|
||||
.PP
|
||||
\&\fBBIO_new_ex()\fR was added in OpenSSL 3.0.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
Create a memory \s-1BIO:\s0
|
||||
Create a memory BIO:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& BIO *mem = BIO_new(BIO_s_mem());
|
||||
.Ve
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,98 +53,39 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_NEW_CMS 3ossl"
|
||||
.TH BIO_NEW_CMS 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_NEW_CMS 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_new_CMS \- CMS streaming filter BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
\&
|
||||
\& BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_new_CMS()\fR returns a streaming filter \s-1BIO\s0 chain based on \fBcms\fR. The output
|
||||
\&\fBBIO_new_CMS()\fR returns a streaming filter BIO chain based on \fBcms\fR. The output
|
||||
of the filter is written to \fBout\fR. Any data written to the chain is
|
||||
automatically translated to a \s-1BER\s0 format \s-1CMS\s0 structure of the appropriate type.
|
||||
.SH "NOTES"
|
||||
automatically translated to a BER format CMS structure of the appropriate type.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The chain returned by this function behaves like a standard filter \s-1BIO.\s0 It
|
||||
The chain returned by this function behaves like a standard filter BIO. It
|
||||
supports non blocking I/O. Content is processed and streamed on the fly and not
|
||||
all held in memory at once: so it is possible to encode very large structures.
|
||||
After all content has been written through the chain \fBBIO_flush()\fR must be called
|
||||
to finalise the structure.
|
||||
.PP
|
||||
The \fB\s-1CMS_STREAM\s0\fR flag must be included in the corresponding \fBflags\fR
|
||||
The \fBCMS_STREAM\fR flag must be included in the corresponding \fBflags\fR
|
||||
parameter of the \fBcms\fR creation function.
|
||||
.PP
|
||||
If an application wishes to write additional data to \fBout\fR BIOs should be
|
||||
|
|
@ -177,28 +102,28 @@ responsibility to set the inner content type of any outer CMS_ContentInfo
|
|||
structures.
|
||||
.PP
|
||||
Large numbers of small writes through the chain should be avoided as this will
|
||||
produce an output consisting of lots of \s-1OCTET STRING\s0 structures. Prepending
|
||||
a \fBBIO_f_buffer()\fR buffering \s-1BIO\s0 will prevent this.
|
||||
.SH "BUGS"
|
||||
produce an output consisting of lots of OCTET STRING structures. Prepending
|
||||
a \fBBIO_f_buffer()\fR buffering BIO will prevent this.
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
There is currently no corresponding inverse \s-1BIO:\s0 i.e. one which can decode
|
||||
a \s-1CMS\s0 structure on the fly.
|
||||
There is currently no corresponding inverse BIO: i.e. one which can decode
|
||||
a CMS structure on the fly.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_new_CMS()\fR returns a \s-1BIO\s0 chain when successful or \s-1NULL\s0 if an error
|
||||
\&\fBBIO_new_CMS()\fR returns a BIO chain when successful or NULL if an error
|
||||
occurred. The error can be obtained from \fBERR_get_error\fR\|(3).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_sign\fR\|(3),
|
||||
\&\fBCMS_encrypt\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBIO_new_CMS()\fR function was added in OpenSSL 1.0.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_PARSE_HOSTSERV 3ossl"
|
||||
.TH BIO_PARSE_HOSTSERV 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_PARSE_HOSTSERV 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_hostserv_priorities,
|
||||
BIO_parse_hostserv
|
||||
\&\- utility routines to parse a standard host and service string
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -153,7 +78,7 @@ BIO_parse_hostserv
|
|||
\& int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
|
||||
\& enum BIO_hostserv_priorities hostserv_prio);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_parse_hostserv()\fR will parse the information given in \fBhostserv\fR,
|
||||
create strings with the hostname and service name and give those
|
||||
|
|
@ -174,8 +99,8 @@ The syntax the \fBBIO_parse_hostserv()\fR recognises is:
|
|||
\& service
|
||||
.Ve
|
||||
.PP
|
||||
The host part can be a name or an \s-1IP\s0 address. If it's a IPv6
|
||||
address, it \s-1MUST\s0 be enclosed in brackets, such as '[::1]'.
|
||||
The host part can be a name or an IP address. If it\*(Aqs a IPv6
|
||||
address, it MUST be enclosed in brackets, such as \*(Aq[::1]\*(Aq.
|
||||
.PP
|
||||
The service part can be a service name or its port number. A service name
|
||||
will be mapped to a port number using the system function \fBgetservbyname()\fR.
|
||||
|
|
@ -204,12 +129,12 @@ and \fBhostserv_prio\fR, as follows:
|
|||
\&\fBBIO_parse_hostserv()\fR returns 1 on success or 0 on error.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\s-1\fBBIO_ADDRINFO\s0\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
\&\fBBIO_ADDRINFO\fR\|(3)
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2016\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_PRINTF 3ossl"
|
||||
.TH BIO_PRINTF 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_PRINTF 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_printf, BIO_vprintf, BIO_snprintf, BIO_vsnprintf
|
||||
\&\- formatted output to a BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -152,14 +77,14 @@ BIO_printf, BIO_vprintf, BIO_snprintf, BIO_vsnprintf
|
|||
\& int BIO_snprintf(char *buf, size_t n, const char *format, ...);
|
||||
\& int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_printf()\fR is similar to the standard C \fBprintf()\fR function, except that
|
||||
the output is sent to the specified \s-1BIO,\s0 \fIbio\fR, rather than standard
|
||||
the output is sent to the specified BIO, \fIbio\fR, rather than standard
|
||||
output. All common format specifiers are supported.
|
||||
.PP
|
||||
\&\fBBIO_vprintf()\fR is similar to the \fBvprintf()\fR function found on many platforms,
|
||||
the output is sent to the specified \s-1BIO,\s0 \fIbio\fR, rather than standard
|
||||
the output is sent to the specified BIO, \fIbio\fR, rather than standard
|
||||
output. All common format specifiers are supported. The argument
|
||||
list \fIargs\fR is a stdarg argument list.
|
||||
.PP
|
||||
|
|
@ -173,17 +98,17 @@ specifies the size of the output buffer.
|
|||
All functions return the number of bytes written, or \-1 on error.
|
||||
For \fBBIO_snprintf()\fR and \fBBIO_vsnprintf()\fR this includes when the output
|
||||
buffer is too small.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Except when \fIn\fR is 0, both \fBBIO_snprintf()\fR and \fBBIO_vsnprintf()\fR always
|
||||
terminate their output with \f(CW\*(Aq\e0\*(Aq\fR. This includes cases where \-1 is
|
||||
returned, such as when there is insufficient space to output the whole
|
||||
string.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2017\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_PUSH 3ossl"
|
||||
.TH BIO_PUSH 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_PUSH 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_push, BIO_pop, BIO_set_next \- add and remove BIOs from a chain
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -149,44 +74,44 @@ BIO_push, BIO_pop, BIO_set_next \- add and remove BIOs from a chain
|
|||
\& BIO *BIO_pop(BIO *b);
|
||||
\& void BIO_set_next(BIO *b, BIO *next);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_push()\fR pushes \fIb\fR on \fInext\fR.
|
||||
If \fIb\fR is \s-1NULL\s0 the function does nothing and returns \fInext\fR.
|
||||
Otherwise it prepends \fIb\fR, which may be a single \s-1BIO\s0 or a chain of BIOs,
|
||||
to \fInext\fR (unless \fInext\fR is \s-1NULL\s0).
|
||||
If \fIb\fR is NULL the function does nothing and returns \fInext\fR.
|
||||
Otherwise it prepends \fIb\fR, which may be a single BIO or a chain of BIOs,
|
||||
to \fInext\fR (unless \fInext\fR is NULL).
|
||||
It then makes a control call on \fIb\fR and returns \fIb\fR.
|
||||
.PP
|
||||
\&\fBBIO_pop()\fR removes the \s-1BIO\s0 \fIb\fR from any chain is is part of.
|
||||
If \fIb\fR is \s-1NULL\s0 the function does nothing and returns \s-1NULL.\s0
|
||||
\&\fBBIO_pop()\fR removes the BIO \fIb\fR from any chain is is part of.
|
||||
If \fIb\fR is NULL the function does nothing and returns NULL.
|
||||
Otherwise it makes a control call on \fIb\fR and
|
||||
returns the next \s-1BIO\s0 in the chain, or \s-1NULL\s0 if there is no next \s-1BIO.\s0
|
||||
The removed \s-1BIO\s0 becomes a single \s-1BIO\s0 with no association with
|
||||
returns the next BIO in the chain, or NULL if there is no next BIO.
|
||||
The removed BIO becomes a single BIO with no association with
|
||||
the original chain, it can thus be freed or be made part of a different chain.
|
||||
.PP
|
||||
\&\fBBIO_set_next()\fR replaces the existing next \s-1BIO\s0 in a chain with the \s-1BIO\s0 pointed to
|
||||
\&\fBBIO_set_next()\fR replaces the existing next BIO in a chain with the BIO pointed to
|
||||
by \fInext\fR. The new chain may include some of the same BIOs from the old chain
|
||||
or it may be completely different.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The names of these functions are perhaps a little misleading. \fBBIO_push()\fR
|
||||
joins two \s-1BIO\s0 chains whereas \fBBIO_pop()\fR deletes a single \s-1BIO\s0 from a chain,
|
||||
the deleted \s-1BIO\s0 does not need to be at the end of a chain.
|
||||
joins two BIO chains whereas \fBBIO_pop()\fR deletes a single BIO from a chain,
|
||||
the deleted BIO does not need to be at the end of a chain.
|
||||
.PP
|
||||
The process of calling \fBBIO_push()\fR and \fBBIO_pop()\fR on a \s-1BIO\s0 may have additional
|
||||
The process of calling \fBBIO_push()\fR and \fBBIO_pop()\fR on a BIO may have additional
|
||||
consequences (a control call is made to the affected BIOs).
|
||||
Any effects will be noted in the descriptions of individual BIOs.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_push()\fR returns the head of the chain,
|
||||
which usually is \fIb\fR, or \fInext\fR if \fIb\fR is \s-1NULL.\s0
|
||||
which usually is \fIb\fR, or \fInext\fR if \fIb\fR is NULL.
|
||||
.PP
|
||||
\&\fBBIO_pop()\fR returns the next \s-1BIO\s0 in the chain,
|
||||
or \s-1NULL\s0 if there is no next \s-1BIO.\s0
|
||||
.SH "EXAMPLES"
|
||||
\&\fBBIO_pop()\fR returns the next BIO in the chain,
|
||||
or NULL if there is no next BIO.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
For these examples suppose \fImd1\fR and \fImd2\fR are digest BIOs,
|
||||
\&\fIb64\fR is a base64 \s-1BIO\s0 and \fIf\fR is a file \s-1BIO.\s0
|
||||
\&\fIb64\fR is a base64 BIO and \fIf\fR is a file BIO.
|
||||
.PP
|
||||
If the call:
|
||||
.PP
|
||||
|
|
@ -220,14 +145,14 @@ except that \fImd2\fR will no more be applied.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBbio\fR\|(7)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBIO_set_next()\fR function was added in OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_READ 3ossl"
|
||||
.TH BIO_READ 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_READ 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_read_ex, BIO_write_ex, BIO_read, BIO_write,
|
||||
BIO_gets, BIO_get_line, BIO_puts
|
||||
\&\- BIO I/O functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -156,40 +81,40 @@ BIO_gets, BIO_get_line, BIO_puts
|
|||
\& int BIO_write(BIO *b, const void *data, int dlen);
|
||||
\& int BIO_puts(BIO *b, const char *buf);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_read_ex()\fR attempts to read \fIdlen\fR bytes from \s-1BIO\s0 \fIb\fR and places the data
|
||||
\&\fBBIO_read_ex()\fR attempts to read \fIdlen\fR bytes from BIO \fIb\fR and places the data
|
||||
in \fIdata\fR. If any bytes were successfully read then the number of bytes read is
|
||||
stored in \fI*readbytes\fR.
|
||||
.PP
|
||||
\&\fBBIO_write_ex()\fR attempts to write \fIdlen\fR bytes from \fIdata\fR to \s-1BIO\s0 \fIb\fR.
|
||||
\&\fBBIO_write_ex()\fR attempts to write \fIdlen\fR bytes from \fIdata\fR to BIO \fIb\fR.
|
||||
If successful then the number of bytes written is stored in \fI*written\fR
|
||||
unless \fIwritten\fR is \s-1NULL.\s0
|
||||
unless \fIwritten\fR is NULL.
|
||||
.PP
|
||||
\&\fBBIO_read()\fR attempts to read \fIlen\fR bytes from \s-1BIO\s0 \fIb\fR and places
|
||||
\&\fBBIO_read()\fR attempts to read \fIlen\fR bytes from BIO \fIb\fR and places
|
||||
the data in \fIbuf\fR.
|
||||
.PP
|
||||
\&\fBBIO_gets()\fR performs the BIOs \*(L"gets\*(R" operation and places the data
|
||||
\&\fBBIO_gets()\fR performs the BIOs "gets" operation and places the data
|
||||
in \fIbuf\fR. Usually this operation will attempt to read a line of data
|
||||
from the \s-1BIO\s0 of maximum length \fIsize\-1\fR. There are exceptions to this,
|
||||
however; for example, \fBBIO_gets()\fR on a digest \s-1BIO\s0 will calculate and
|
||||
from the BIO of maximum length \fIsize\-1\fR. There are exceptions to this,
|
||||
however; for example, \fBBIO_gets()\fR on a digest BIO will calculate and
|
||||
return the digest and other BIOs may not support \fBBIO_gets()\fR at all.
|
||||
The returned string is always NUL-terminated and the '\en' is preserved
|
||||
The returned string is always NUL\-terminated and the \*(Aq\en\*(Aq is preserved
|
||||
if present in the input data.
|
||||
On binary input there may be \s-1NUL\s0 characters within the string;
|
||||
On binary input there may be NUL characters within the string;
|
||||
in this case the return value (if nonnegative) may give an incorrect length.
|
||||
.PP
|
||||
\&\fBBIO_get_line()\fR attempts to read from \s-1BIO\s0 \fIb\fR a line of data up to the next '\en'
|
||||
\&\fBBIO_get_line()\fR attempts to read from BIO \fIb\fR a line of data up to the next \*(Aq\en\*(Aq
|
||||
or the maximum length \fIsize\-1\fR is reached and places the data in \fIbuf\fR.
|
||||
The returned string is always NUL-terminated and the '\en' is preserved
|
||||
The returned string is always NUL\-terminated and the \*(Aq\en\*(Aq is preserved
|
||||
if present in the input data.
|
||||
On binary input there may be \s-1NUL\s0 characters within the string;
|
||||
On binary input there may be NUL characters within the string;
|
||||
in this case the return value (if nonnegative) gives the actual length read.
|
||||
For implementing this, unfortunately the data needs to be read byte-by-byte.
|
||||
For implementing this, unfortunately the data needs to be read byte\-by\-byte.
|
||||
.PP
|
||||
\&\fBBIO_write()\fR attempts to write \fIlen\fR bytes from \fIbuf\fR to \s-1BIO\s0 \fIb\fR.
|
||||
\&\fBBIO_write()\fR attempts to write \fIlen\fR bytes from \fIbuf\fR to BIO \fIb\fR.
|
||||
.PP
|
||||
\&\fBBIO_puts()\fR attempts to write a NUL-terminated string \fIbuf\fR to \s-1BIO\s0 \fIb\fR.
|
||||
\&\fBBIO_puts()\fR attempts to write a NUL\-terminated string \fIbuf\fR to BIO \fIb\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_read_ex()\fR returns 1 if data was successfully read, and 0 otherwise.
|
||||
|
|
@ -197,24 +122,24 @@ For implementing this, unfortunately the data needs to be read byte-by-byte.
|
|||
\&\fBBIO_write_ex()\fR returns 1 if no error was encountered writing data, 0 otherwise.
|
||||
Requesting to write 0 bytes is not considered an error.
|
||||
.PP
|
||||
\&\fBBIO_write()\fR returns \-2 if the \*(L"write\*(R" operation is not implemented by the \s-1BIO\s0
|
||||
\&\fBBIO_write()\fR returns \-2 if the "write" operation is not implemented by the BIO
|
||||
or \-1 on other errors.
|
||||
Otherwise it returns the number of bytes written.
|
||||
This may be 0 if the \s-1BIO\s0 \fIb\fR is \s-1NULL\s0 or \fIdlen <= 0\fR.
|
||||
This may be 0 if the BIO \fIb\fR is NULL or \fIdlen <= 0\fR.
|
||||
.PP
|
||||
\&\fBBIO_gets()\fR returns \-2 if the \*(L"gets\*(R" operation is not implemented by the \s-1BIO\s0
|
||||
\&\fBBIO_gets()\fR returns \-2 if the "gets" operation is not implemented by the BIO
|
||||
or \-1 on other errors.
|
||||
Otherwise it typically returns the amount of data read,
|
||||
but depending on the implementation it may return only the length up to
|
||||
the first \s-1NUL\s0 character contained in the data read.
|
||||
In any case the trailing \s-1NUL\s0 that is added after the data read
|
||||
the first NUL character contained in the data read.
|
||||
In any case the trailing NUL that is added after the data read
|
||||
is not included in the length returned.
|
||||
.PP
|
||||
All other functions return either the amount of data successfully read or
|
||||
written (if the return value is positive) or that no data was successfully
|
||||
read or written if the result is 0 or \-1. If the return value is \-2 then
|
||||
the operation is not implemented in the specific \s-1BIO\s0 type.
|
||||
.SH "NOTES"
|
||||
the operation is not implemented in the specific BIO type.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
A 0 or \-1 return is not necessarily an indication of an error. In
|
||||
particular when the source/sink is nonblocking or of a certain type
|
||||
|
|
@ -226,7 +151,7 @@ One technique sometimes used with blocking sockets is to use a system call
|
|||
and then call \fBread()\fR to read the data. The equivalent with BIOs (that is call
|
||||
\&\fBselect()\fR on the underlying I/O structure and then call \fBBIO_read()\fR to
|
||||
read the data) should \fBnot\fR be used because a single call to \fBBIO_read()\fR
|
||||
can cause several reads (and writes in the case of \s-1SSL\s0 BIOs) on the underlying
|
||||
can cause several reads (and writes in the case of SSL BIOs) on the underlying
|
||||
I/O structure and may block as a result. Instead \fBselect()\fR (or equivalent)
|
||||
should be combined with non blocking I/O so successive reads will request
|
||||
a retry instead of blocking.
|
||||
|
|
@ -234,26 +159,26 @@ a retry instead of blocking.
|
|||
See \fBBIO_should_retry\fR\|(3) for details of how to
|
||||
determine the cause of a retry and other I/O issues.
|
||||
.PP
|
||||
If the \*(L"gets\*(R" method is not supported by a \s-1BIO\s0 then \fBBIO_get_line()\fR can be used.
|
||||
It is also possible to make \fBBIO_gets()\fR usable even if the \*(L"gets\*(R" method is not
|
||||
supported by adding a buffering \s-1BIO\s0 \fBBIO_f_buffer\fR\|(3) to the chain.
|
||||
If the "gets" method is not supported by a BIO then \fBBIO_get_line()\fR can be used.
|
||||
It is also possible to make \fBBIO_gets()\fR usable even if the "gets" method is not
|
||||
supported by adding a buffering BIO \fBBIO_f_buffer\fR\|(3) to the chain.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBBIO_should_retry\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBIO_gets()\fR on 1.1.0 and older when called on \fBBIO_fd()\fR based \s-1BIO\s0 did not
|
||||
keep the '\en' at the end of the line in the buffer.
|
||||
\&\fBBIO_gets()\fR on 1.1.0 and older when called on \fBBIO_fd()\fR based BIO did not
|
||||
keep the \*(Aq\en\*(Aq at the end of the line in the buffer.
|
||||
.PP
|
||||
\&\fBBIO_get_line()\fR was added in OpenSSL 3.0.
|
||||
.PP
|
||||
\&\fBBIO_write_ex()\fR returns 1 if the size of the data to write is 0 and the
|
||||
\&\fIwritten\fR parameter of the function can be \s-1NULL\s0 since OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
\&\fIwritten\fR parameter of the function can be NULL since OpenSSL 3.0.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,82 +53,23 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_ACCEPT 3ossl"
|
||||
.TH BIO_S_ACCEPT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_ACCEPT 3ossl 2025-03-25 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_accept, BIO_set_accept_name, BIO_set_accept_port, BIO_get_accept_name,
|
||||
BIO_get_accept_port, BIO_new_accept, BIO_set_nbio_accept, BIO_set_accept_bios,
|
||||
BIO_get_peer_name, BIO_get_peer_port,
|
||||
BIO_get_accept_ip_family, BIO_set_accept_ip_family,
|
||||
BIO_set_bind_mode, BIO_get_bind_mode, BIO_do_accept \- accept BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -172,45 +97,45 @@ BIO_set_bind_mode, BIO_get_bind_mode, BIO_do_accept \- accept BIO
|
|||
\&
|
||||
\& int BIO_do_accept(BIO *b);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_accept()\fR returns the accept \s-1BIO\s0 method. This is a wrapper
|
||||
round the platform's \s-1TCP/IP\s0 socket accept routines.
|
||||
\&\fBBIO_s_accept()\fR returns the accept BIO method. This is a wrapper
|
||||
round the platform\*(Aqs TCP/IP socket accept routines.
|
||||
.PP
|
||||
Using accept BIOs, \s-1TCP/IP\s0 connections can be accepted and data
|
||||
transferred using only \s-1BIO\s0 routines. In this way any platform
|
||||
specific operations are hidden by the \s-1BIO\s0 abstraction.
|
||||
Using accept BIOs, TCP/IP connections can be accepted and data
|
||||
transferred using only BIO routines. In this way any platform
|
||||
specific operations are hidden by the BIO abstraction.
|
||||
.PP
|
||||
Read and write operations on an accept \s-1BIO\s0 will perform I/O
|
||||
Read and write operations on an accept BIO will perform I/O
|
||||
on the underlying connection. If no connection is established
|
||||
and the port (see below) is set up properly then the \s-1BIO\s0
|
||||
and the port (see below) is set up properly then the BIO
|
||||
waits for an incoming connection.
|
||||
.PP
|
||||
Accept BIOs support \fBBIO_puts()\fR but not \fBBIO_gets()\fR.
|
||||
.PP
|
||||
If the close flag is set on an accept \s-1BIO\s0 then any active
|
||||
If the close flag is set on an accept BIO then any active
|
||||
connection on that chain is shutdown and the socket closed when
|
||||
the \s-1BIO\s0 is freed.
|
||||
the BIO is freed.
|
||||
.PP
|
||||
Calling \fBBIO_reset()\fR on an accept \s-1BIO\s0 will close any active
|
||||
connection and reset the \s-1BIO\s0 into a state where it awaits another
|
||||
Calling \fBBIO_reset()\fR on an accept BIO will close any active
|
||||
connection and reset the BIO into a state where it awaits another
|
||||
incoming connection.
|
||||
.PP
|
||||
\&\fBBIO_get_fd()\fR and \fBBIO_set_fd()\fR can be called to retrieve or set
|
||||
the accept socket. See \fBBIO_s_fd\fR\|(3)
|
||||
.PP
|
||||
\&\fBBIO_set_accept_name()\fR uses the string \fBname\fR to set the accept
|
||||
name. The name is represented as a string of the form \*(L"host:port\*(R",
|
||||
where \*(L"host\*(R" is the interface to use and \*(L"port\*(R" is the port.
|
||||
The host can be \*(L"*\*(R" or empty which is interpreted as meaning
|
||||
name. The name is represented as a string of the form "host:port",
|
||||
where "host" is the interface to use and "port" is the port.
|
||||
The host can be "*" or empty which is interpreted as meaning
|
||||
any interface. If the host is an IPv6 address, it has to be
|
||||
enclosed in brackets, for example \*(L"[::1]:https\*(R". \*(L"port\*(R" has the
|
||||
enclosed in brackets, for example "[::1]:https". "port" has the
|
||||
same syntax as the port specified in \fBBIO_set_conn_port()\fR for
|
||||
connect BIOs, that is it can be a numerical port string or a
|
||||
string to lookup using \fBgetservbyname()\fR and a string table.
|
||||
.PP
|
||||
\&\fBBIO_set_accept_port()\fR uses the string \fBport\fR to set the accept
|
||||
port of \s-1BIO\s0 \fIb\fR. \*(L"port\*(R" has the same syntax as the port specified in
|
||||
port of BIO \fIb\fR. "port" has the same syntax as the port specified in
|
||||
\&\fBBIO_set_conn_port()\fR for connect BIOs, that is it can be a numerical
|
||||
port string or a string to lookup using \fBgetservbyname()\fR and a string
|
||||
table.
|
||||
|
|
@ -218,7 +143,7 @@ If the given port is \f(CW0\fR then a random available port is chosen.
|
|||
It may be queried using \fBBIO_sock_info()\fR and \fBBIO_ADDR_service_string\fR\|(3).
|
||||
.PP
|
||||
\&\fBBIO_new_accept()\fR combines \fBBIO_new()\fR and \fBBIO_set_accept_name()\fR into
|
||||
a single call: that is it creates a new accept \s-1BIO\s0 with port
|
||||
a single call: that is it creates a new accept BIO with port
|
||||
\&\fBhost_port\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_nbio_accept()\fR sets the accept socket to blocking mode
|
||||
|
|
@ -227,49 +152,49 @@ a single call: that is it creates a new accept \s-1BIO\s0 with port
|
|||
\&\fBBIO_set_accept_bios()\fR can be used to set a chain of BIOs which
|
||||
will be duplicated and prepended to the chain when an incoming
|
||||
connection is received. This is useful if, for example, a
|
||||
buffering or \s-1SSL BIO\s0 is required for each connection. The
|
||||
buffering or SSL BIO is required for each connection. The
|
||||
chain of BIOs must not be freed after this call, they will
|
||||
be automatically freed when the accept \s-1BIO\s0 is freed.
|
||||
be automatically freed when the accept BIO is freed.
|
||||
.PP
|
||||
\&\fBBIO_get_accept_ip_family()\fR returns the \s-1IP\s0 family accepted by the \s-1BIO\s0 \fIb\fR,
|
||||
which may be \fB\s-1BIO_FAMILY_IPV4\s0\fR, \fB\s-1BIO_FAMILY_IPV6\s0\fR, or \fB\s-1BIO_FAMILY_IPANY\s0\fR.
|
||||
\&\fBBIO_get_accept_ip_family()\fR returns the IP family accepted by the BIO \fIb\fR,
|
||||
which may be \fBBIO_FAMILY_IPV4\fR, \fBBIO_FAMILY_IPV6\fR, or \fBBIO_FAMILY_IPANY\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_accept_ip_family()\fR sets the \s-1IP\s0 family \fIfamily\fR accepted by \s-1BIO\s0 \fIb\fR.
|
||||
The default is \fB\s-1BIO_FAMILY_IPANY\s0\fR.
|
||||
\&\fBBIO_set_accept_ip_family()\fR sets the IP family \fIfamily\fR accepted by BIO \fIb\fR.
|
||||
The default is \fBBIO_FAMILY_IPANY\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_bind_mode()\fR and \fBBIO_get_bind_mode()\fR set and retrieve
|
||||
the current bind mode. If \fB\s-1BIO_BIND_NORMAL\s0\fR (the default) is set
|
||||
the current bind mode. If \fBBIO_BIND_NORMAL\fR (the default) is set
|
||||
then another socket cannot be bound to the same port. If
|
||||
\&\fB\s-1BIO_BIND_REUSEADDR\s0\fR is set then other sockets can bind to the
|
||||
same port. If \fB\s-1BIO_BIND_REUSEADDR_IF_UNUSED\s0\fR is set then and
|
||||
attempt is first made to use \s-1BIO_BIN_NORMAL,\s0 if this fails
|
||||
\&\fBBIO_BIND_REUSEADDR\fR is set then other sockets can bind to the
|
||||
same port. If \fBBIO_BIND_REUSEADDR_IF_UNUSED\fR is set then and
|
||||
attempt is first made to use BIO_BIN_NORMAL, if this fails
|
||||
and the port is not in use then a second attempt is made
|
||||
using \fB\s-1BIO_BIND_REUSEADDR\s0\fR.
|
||||
using \fBBIO_BIND_REUSEADDR\fR.
|
||||
.PP
|
||||
\&\fBBIO_do_accept()\fR serves two functions. When it is first
|
||||
called, after the accept \s-1BIO\s0 has been setup, it will attempt
|
||||
called, after the accept BIO has been setup, it will attempt
|
||||
to create the accept socket and bind an address to it. Second
|
||||
and subsequent calls to \fBBIO_do_accept()\fR will await an incoming
|
||||
connection, or request a retry in non blocking mode.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
When an accept \s-1BIO\s0 is at the end of a chain it will await an
|
||||
When an accept BIO is at the end of a chain it will await an
|
||||
incoming connection before processing I/O calls. When an accept
|
||||
\&\s-1BIO\s0 is not at then end of a chain it passes I/O calls to the next
|
||||
\&\s-1BIO\s0 in the chain.
|
||||
BIO is not at then end of a chain it passes I/O calls to the next
|
||||
BIO in the chain.
|
||||
.PP
|
||||
When a connection is established a new socket \s-1BIO\s0 is created for
|
||||
When a connection is established a new socket BIO is created for
|
||||
the connection and appended to the chain. That is the chain is now
|
||||
accept\->socket. This effectively means that attempting I/O on
|
||||
an initial accept socket will await an incoming connection then
|
||||
perform I/O on it.
|
||||
.PP
|
||||
If any additional BIOs have been set using \fBBIO_set_accept_bios()\fR
|
||||
then they are placed between the socket and the accept \s-1BIO,\s0
|
||||
then they are placed between the socket and the accept BIO,
|
||||
that is the chain will be accept\->otherbios\->socket.
|
||||
.PP
|
||||
If a server wishes to process multiple connections (as is normally
|
||||
the case) then the accept \s-1BIO\s0 must be made available for further
|
||||
the case) then the accept BIO must be made available for further
|
||||
incoming connections. This can be done by waiting for a connection and
|
||||
then calling:
|
||||
.PP
|
||||
|
|
@ -277,21 +202,21 @@ then calling:
|
|||
\& connection = BIO_pop(accept);
|
||||
.Ve
|
||||
.PP
|
||||
After this call \fBconnection\fR will contain a \s-1BIO\s0 for the recently
|
||||
established connection and \fBaccept\fR will now be a single \s-1BIO\s0
|
||||
After this call \fBconnection\fR will contain a BIO for the recently
|
||||
established connection and \fBaccept\fR will now be a single BIO
|
||||
again which can be used to await further incoming connections.
|
||||
If no further connections will be accepted the \fBaccept\fR can
|
||||
be freed using \fBBIO_free()\fR.
|
||||
.PP
|
||||
If only a single connection will be processed it is possible to
|
||||
perform I/O using the accept \s-1BIO\s0 itself. This is often undesirable
|
||||
however because the accept \s-1BIO\s0 will still accept additional incoming
|
||||
perform I/O using the accept BIO itself. This is often undesirable
|
||||
however because the accept BIO will still accept additional incoming
|
||||
connections. This can be resolved by using \fBBIO_pop()\fR (see above)
|
||||
and freeing up the accept \s-1BIO\s0 after the initial connection.
|
||||
and freeing up the accept BIO after the initial connection.
|
||||
.PP
|
||||
If the underlying accept socket is nonblocking and \fBBIO_do_accept()\fR is
|
||||
called to await an incoming connection it is possible for
|
||||
\&\fBBIO_should_io_special()\fR with the reason \s-1BIO_RR_ACCEPT.\s0 If this happens
|
||||
\&\fBBIO_should_io_special()\fR with the reason BIO_RR_ACCEPT. If this happens
|
||||
then it is an indication that an accept attempt would block: the application
|
||||
should take appropriate action to wait until the underlying socket has
|
||||
accepted a connection and retry the call.
|
||||
|
|
@ -306,19 +231,19 @@ accepted a connection and retry the call.
|
|||
\&\fBBIO_do_accept()\fR,
|
||||
\&\fBBIO_set_accept_name()\fR, \fBBIO_set_accept_port()\fR, \fBBIO_set_nbio_accept()\fR,
|
||||
\&\fBBIO_set_accept_bios()\fR, \fBBIO_set_accept_ip_family()\fR, and \fBBIO_set_bind_mode()\fR
|
||||
return 1 for success and <=0 for failure.
|
||||
return 1 for success and <= 0 for failure.
|
||||
.PP
|
||||
\&\fBBIO_get_accept_name()\fR returns the accept name or \s-1NULL\s0 on error.
|
||||
\&\fBBIO_get_peer_name()\fR returns the peer name or \s-1NULL\s0 on error.
|
||||
\&\fBBIO_get_accept_name()\fR returns the accept name or NULL on error.
|
||||
\&\fBBIO_get_peer_name()\fR returns the peer name or NULL on error.
|
||||
.PP
|
||||
\&\fBBIO_get_accept_port()\fR returns the accept port as a string or \s-1NULL\s0 on error.
|
||||
\&\fBBIO_get_peer_port()\fR returns the peer port as a string or \s-1NULL\s0 on error.
|
||||
\&\fBBIO_get_accept_ip_family()\fR returns the \s-1IP\s0 family or <=0 on error.
|
||||
\&\fBBIO_get_accept_port()\fR returns the accept port as a string or NULL on error.
|
||||
\&\fBBIO_get_peer_port()\fR returns the peer port as a string or NULL on error.
|
||||
\&\fBBIO_get_accept_ip_family()\fR returns the IP family or <= 0 on error.
|
||||
.PP
|
||||
\&\fBBIO_get_bind_mode()\fR returns the set of \fB\s-1BIO_BIND\s0\fR flags, or <=0 on failure.
|
||||
\&\fBBIO_get_bind_mode()\fR returns the set of \fBBIO_BIND\fR flags, or <= 0 on failure.
|
||||
.PP
|
||||
\&\fBBIO_new_accept()\fR returns a \s-1BIO\s0 or \s-1NULL\s0 on error.
|
||||
.SH "EXAMPLES"
|
||||
\&\fBBIO_new_accept()\fR returns a BIO or NULL on error.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
This example accepts two connections on port 4444, sends messages
|
||||
down each and finally closes both down.
|
||||
|
|
@ -367,11 +292,11 @@ down each and finally closes both down.
|
|||
\& BIO_free(cbio);
|
||||
\& BIO_free(cbio2);
|
||||
.Ve
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_BIO 3ossl"
|
||||
.TH BIO_S_BIO 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_BIO 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_bio, BIO_make_bio_pair, BIO_destroy_bio_pair, BIO_shutdown_wr,
|
||||
BIO_set_write_buf_size, BIO_get_write_buf_size, BIO_new_bio_pair,
|
||||
BIO_get_write_guarantee, BIO_ctrl_get_write_guarantee, BIO_get_read_request,
|
||||
BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request \- BIO pair BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -165,20 +90,20 @@ BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request \- BIO pair BIO
|
|||
\& size_t BIO_ctrl_get_read_request(BIO *b);
|
||||
\& int BIO_ctrl_reset_read_request(BIO *b);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_bio()\fR returns the method for a \s-1BIO\s0 pair. A \s-1BIO\s0 pair is a pair of source/sink
|
||||
\&\fBBIO_s_bio()\fR returns the method for a BIO pair. A BIO pair is a pair of source/sink
|
||||
BIOs where data written to either half of the pair is buffered and can be read from
|
||||
the other half. Both halves must usually by handled by the same application thread
|
||||
since no locking is done on the internal data structures.
|
||||
.PP
|
||||
Since \s-1BIO\s0 chains typically end in a source/sink \s-1BIO\s0 it is possible to make this
|
||||
one half of a \s-1BIO\s0 pair and have all the data processed by the chain under application
|
||||
Since BIO chains typically end in a source/sink BIO it is possible to make this
|
||||
one half of a BIO pair and have all the data processed by the chain under application
|
||||
control.
|
||||
.PP
|
||||
One typical use of \s-1BIO\s0 pairs is to place \s-1TLS/SSL I/O\s0 under application control, this
|
||||
One typical use of BIO pairs is to place TLS/SSL I/O under application control, this
|
||||
can be used when the application wishes to use a non standard transport for
|
||||
\&\s-1TLS/SSL\s0 or the normal socket routines are inappropriate.
|
||||
TLS/SSL or the normal socket routines are inappropriate.
|
||||
.PP
|
||||
Calls to \fBBIO_read_ex()\fR will read data from the buffer or request a retry if no
|
||||
data is available.
|
||||
|
|
@ -196,14 +121,14 @@ determine the amount of pending data in the read or write buffer.
|
|||
\&\fBBIO_destroy_pair()\fR destroys the association between two connected BIOs. Freeing
|
||||
up any half of the pair will automatically destroy the association.
|
||||
.PP
|
||||
\&\fBBIO_shutdown_wr()\fR is used to close down a \s-1BIO\s0 \fBb\fR. After this call no further
|
||||
writes on \s-1BIO\s0 \fBb\fR are allowed (they will return an error). Reads on the other
|
||||
half of the pair will return any pending data or \s-1EOF\s0 when all pending data has
|
||||
\&\fBBIO_shutdown_wr()\fR is used to close down a BIO \fBb\fR. After this call no further
|
||||
writes on BIO \fBb\fR are allowed (they will return an error). Reads on the other
|
||||
half of the pair will return any pending data or EOF when all pending data has
|
||||
been read.
|
||||
.PP
|
||||
\&\fBBIO_set_write_buf_size()\fR sets the write buffer size of \s-1BIO\s0 \fBb\fR to \fBsize\fR.
|
||||
\&\fBBIO_set_write_buf_size()\fR sets the write buffer size of BIO \fBb\fR to \fBsize\fR.
|
||||
If the size is not initialized a default value is used. This is currently
|
||||
17K, sufficient for a maximum size \s-1TLS\s0 record.
|
||||
17K, sufficient for a maximum size TLS record.
|
||||
.PP
|
||||
\&\fBBIO_get_write_buf_size()\fR returns the size of the write buffer.
|
||||
.PP
|
||||
|
|
@ -211,21 +136,21 @@ If the size is not initialized a default value is used. This is currently
|
|||
\&\fBBIO_set_write_buf_size()\fR to create a connected pair of BIOs \fBbio1\fR, \fBbio2\fR
|
||||
with write buffer sizes \fBwritebuf1\fR and \fBwritebuf2\fR. If either size is
|
||||
zero then the default size is used. \fBBIO_new_bio_pair()\fR does not check whether
|
||||
\&\fBbio1\fR or \fBbio2\fR do point to some other \s-1BIO,\s0 the values are overwritten,
|
||||
\&\fBbio1\fR or \fBbio2\fR do point to some other BIO, the values are overwritten,
|
||||
\&\fBBIO_free()\fR is not called.
|
||||
.PP
|
||||
\&\fBBIO_get_write_guarantee()\fR and \fBBIO_ctrl_get_write_guarantee()\fR return the maximum
|
||||
length of data that can be currently written to the \s-1BIO.\s0 Writes larger than this
|
||||
length of data that can be currently written to the BIO. Writes larger than this
|
||||
value will return a value from \fBBIO_write_ex()\fR less than the amount requested or
|
||||
if the buffer is full request a retry. \fBBIO_ctrl_get_write_guarantee()\fR is a
|
||||
function whereas \fBBIO_get_write_guarantee()\fR is a macro.
|
||||
.PP
|
||||
\&\fBBIO_get_read_request()\fR and \fBBIO_ctrl_get_read_request()\fR return the
|
||||
amount of data requested, or the buffer size if it is less, if the
|
||||
last read attempt at the other half of the \s-1BIO\s0 pair failed due to an
|
||||
last read attempt at the other half of the BIO pair failed due to an
|
||||
empty buffer. This can be used to determine how much data should be
|
||||
written to the \s-1BIO\s0 so the next read will succeed: this is most useful
|
||||
in \s-1TLS/SSL\s0 applications where the amount of data read is usually
|
||||
written to the BIO so the next read will succeed: this is most useful
|
||||
in TLS/SSL applications where the amount of data read is usually
|
||||
meaningful rather than just a buffer size. After a successful read
|
||||
this call will return zero. It also will return zero once new data
|
||||
has been written satisfying the read request or part of it.
|
||||
|
|
@ -234,12 +159,12 @@ than that returned by \fBBIO_get_write_guarantee()\fR.
|
|||
.PP
|
||||
\&\fBBIO_ctrl_reset_read_request()\fR can also be used to reset the value returned by
|
||||
\&\fBBIO_get_read_request()\fR to zero.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Both halves of a \s-1BIO\s0 pair should be freed. That is even if one half is implicit
|
||||
Both halves of a BIO pair should be freed. That is even if one half is implicit
|
||||
freed due to a \fBBIO_free_all()\fR or \fBSSL_free()\fR call the other half needs to be freed.
|
||||
.PP
|
||||
When used in bidirectional applications (such as \s-1TLS/SSL\s0) care should be taken to
|
||||
When used in bidirectional applications (such as TLS/SSL) care should be taken to
|
||||
flush any data in the write buffer. This can be done by calling \fBBIO_pending()\fR
|
||||
on the other half of the pair and, if any data is pending, reading it and sending
|
||||
it to the underlying transport. This must be done before any normal processing
|
||||
|
|
@ -247,13 +172,13 @@ it to the underlying transport. This must be done before any normal processing
|
|||
.PP
|
||||
To see why this is important consider a case where a request is sent using
|
||||
\&\fBBIO_write_ex()\fR and a response read with \fBBIO_read_ex()\fR, this can occur during an
|
||||
\&\s-1TLS/SSL\s0 handshake for example. \fBBIO_write_ex()\fR will succeed and place data in the
|
||||
TLS/SSL handshake for example. \fBBIO_write_ex()\fR will succeed and place data in the
|
||||
write buffer. \fBBIO_read_ex()\fR will initially fail and \fBBIO_should_read()\fR will be
|
||||
true. If the application then waits for data to be available on the underlying
|
||||
transport before flushing the write buffer it will never succeed because the
|
||||
request was never sent!
|
||||
.PP
|
||||
\&\fBBIO_eof()\fR is true if no data is in the peer \s-1BIO\s0 and the peer \s-1BIO\s0 has been
|
||||
\&\fBBIO_eof()\fR is true if no data is in the peer BIO and the peer BIO has been
|
||||
shutdown.
|
||||
.PP
|
||||
\&\fBBIO_make_bio_pair()\fR, \fBBIO_destroy_bio_pair()\fR, \fBBIO_shutdown_wr()\fR,
|
||||
|
|
@ -263,15 +188,15 @@ as macros.
|
|||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_new_bio_pair()\fR returns 1 on success, with the new BIOs available in
|
||||
\&\fBbio1\fR and \fBbio2\fR, or 0 on failure, with \s-1NULL\s0 pointers stored into the
|
||||
\&\fBbio1\fR and \fBbio2\fR, or 0 on failure, with NULL pointers stored into the
|
||||
locations for \fBbio1\fR and \fBbio2\fR. Check the error stack for more information.
|
||||
.PP
|
||||
[\s-1XXXXX:\s0 More return values need to be added here]
|
||||
.SH "EXAMPLES"
|
||||
[XXXXX: More return values need to be added here]
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
The \s-1BIO\s0 pair can be used to have full control over the network access of an
|
||||
The BIO pair can be used to have full control over the network access of an
|
||||
application. The application can call \fBselect()\fR on the socket as required
|
||||
without having to go through the SSL-interface.
|
||||
without having to go through the SSL\-interface.
|
||||
.PP
|
||||
.Vb 1
|
||||
\& BIO *internal_bio, *network_bio;
|
||||
|
|
@ -302,18 +227,18 @@ without having to go through the SSL-interface.
|
|||
\& ...
|
||||
.Ve
|
||||
.PP
|
||||
As the \s-1BIO\s0 pair will only buffer the data and never directly access the
|
||||
As the BIO pair will only buffer the data and never directly access the
|
||||
connection, it behaves nonblocking and will return as soon as the write
|
||||
buffer is full or the read buffer is drained. Then the application has to
|
||||
flush the write buffer and/or fill the read buffer.
|
||||
.PP
|
||||
Use the \fBBIO_ctrl_pending()\fR, to find out whether data is buffered in the \s-1BIO\s0
|
||||
Use the \fBBIO_ctrl_pending()\fR, to find out whether data is buffered in the BIO
|
||||
and must be transferred to the network. Use \fBBIO_ctrl_get_read_request()\fR to
|
||||
find out, how many bytes must be written into the buffer before the
|
||||
\&\fBSSL_operation()\fR can successfully be continued.
|
||||
.SH "WARNINGS"
|
||||
.SH WARNINGS
|
||||
.IX Header "WARNINGS"
|
||||
As the data is buffered, \fBSSL_operation()\fR may return with an \s-1ERROR_SSL_WANT_READ\s0
|
||||
As the data is buffered, \fBSSL_operation()\fR may return with an ERROR_SSL_WANT_READ
|
||||
condition, but there is still data in the write buffer. An application must
|
||||
not rely on the error value of \fBSSL_operation()\fR but must assure that the
|
||||
write buffer is always flushed first. Otherwise a deadlock may occur as
|
||||
|
|
@ -322,11 +247,11 @@ the peer might be waiting for the data before being able to continue.
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBSSL_set_bio\fR\|(3), \fBssl\fR\|(7), \fBbio\fR\|(7),
|
||||
\&\fBBIO_should_retry\fR\|(3), \fBBIO_read_ex\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,83 +53,24 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_CONNECT 3ossl"
|
||||
.TH BIO_S_CONNECT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_CONNECT 3ossl 2025-03-25 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_connect, BIO_new_connect,
|
||||
BIO_set_conn_hostname, BIO_set_conn_port,
|
||||
BIO_set_conn_address, BIO_set_conn_ip_family,
|
||||
BIO_get_conn_hostname, BIO_get_conn_port,
|
||||
BIO_get_conn_address, BIO_get_conn_ip_family,
|
||||
BIO_set_nbio, BIO_do_connect \- connect BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -167,59 +92,59 @@ BIO_set_nbio, BIO_do_connect \- connect BIO
|
|||
\&
|
||||
\& long BIO_do_connect(BIO *b);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_connect()\fR returns the connect \s-1BIO\s0 method. This is a wrapper
|
||||
round the platform's \s-1TCP/IP\s0 socket connection routines.
|
||||
\&\fBBIO_s_connect()\fR returns the connect BIO method. This is a wrapper
|
||||
round the platform\*(Aqs TCP/IP socket connection routines.
|
||||
.PP
|
||||
Using connect BIOs, \s-1TCP/IP\s0 connections can be made and data
|
||||
transferred using only \s-1BIO\s0 routines. In this way any platform
|
||||
specific operations are hidden by the \s-1BIO\s0 abstraction.
|
||||
Using connect BIOs, TCP/IP connections can be made and data
|
||||
transferred using only BIO routines. In this way any platform
|
||||
specific operations are hidden by the BIO abstraction.
|
||||
.PP
|
||||
Read and write operations on a connect \s-1BIO\s0 will perform I/O
|
||||
Read and write operations on a connect BIO will perform I/O
|
||||
on the underlying connection. If no connection is established
|
||||
and the port and hostname (see below) is set up properly then
|
||||
a connection is established first.
|
||||
.PP
|
||||
Connect BIOs support \fBBIO_puts()\fR but not \fBBIO_gets()\fR.
|
||||
.PP
|
||||
If the close flag is set on a connect \s-1BIO\s0 then any active
|
||||
connection is shutdown and the socket closed when the \s-1BIO\s0
|
||||
If the close flag is set on a connect BIO then any active
|
||||
connection is shutdown and the socket closed when the BIO
|
||||
is freed.
|
||||
.PP
|
||||
Calling \fBBIO_reset()\fR on a connect \s-1BIO\s0 will close any active
|
||||
connection and reset the \s-1BIO\s0 into a state where it can connect
|
||||
Calling \fBBIO_reset()\fR on a connect BIO will close any active
|
||||
connection and reset the BIO into a state where it can connect
|
||||
to the same host again.
|
||||
.PP
|
||||
\&\fBBIO_new_connect()\fR combines \fBBIO_new()\fR and \fBBIO_set_conn_hostname()\fR into
|
||||
a single call: that is it creates a new connect \s-1BIO\s0 with hostname \fBname\fR.
|
||||
a single call: that is it creates a new connect BIO with hostname \fBname\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_conn_hostname()\fR uses the string \fBname\fR to set the hostname.
|
||||
The hostname can be an \s-1IP\s0 address; if the address is an IPv6 one, it
|
||||
must be enclosed with brackets \f(CW\*(C`[\*(C'\fR and \f(CW\*(C`]\*(C'\fR.
|
||||
The hostname can be an IP address; if the address is an IPv6 one, it
|
||||
must be enclosed in brackets \f(CW\*(C`[\*(C'\fR and \f(CW\*(C`]\*(C'\fR.
|
||||
The hostname can also include the port in the form hostname:port;
|
||||
see \fBBIO_parse_hostserv\fR\|(3) and \fBBIO_set_conn_port()\fR for details.
|
||||
.PP
|
||||
\&\fBBIO_set_conn_port()\fR sets the port to \fBport\fR. \fBport\fR can be the
|
||||
numerical form or a service string such as \*(L"http\*(R", which
|
||||
numerical form or a service string such as "http", which
|
||||
will be mapped to a port number using the system function \fBgetservbyname()\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_conn_address()\fR sets the address and port information using
|
||||
a \s-1\fBBIO_ADDR\s0\fR\|(3ssl).
|
||||
a \fBBIO_ADDR\fR\|(3ssl).
|
||||
.PP
|
||||
\&\fBBIO_set_conn_ip_family()\fR sets the \s-1IP\s0 family.
|
||||
\&\fBBIO_set_conn_ip_family()\fR sets the IP family.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_hostname()\fR returns the hostname of the connect \s-1BIO\s0 or
|
||||
\&\s-1NULL\s0 if the \s-1BIO\s0 is initialized but no hostname is set.
|
||||
\&\fBBIO_get_conn_hostname()\fR returns the hostname of the connect BIO or
|
||||
NULL if the BIO is initialized but no hostname is set.
|
||||
This return value is an internal pointer which should not be modified.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_port()\fR returns the port as a string.
|
||||
This return value is an internal pointer which should not be modified.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_address()\fR returns the address information as a \s-1BIO_ADDR.\s0
|
||||
\&\fBBIO_get_conn_address()\fR returns the address information as a BIO_ADDR.
|
||||
This return value is an internal pointer which should not be modified.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_ip_family()\fR returns the \s-1IP\s0 family of the connect \s-1BIO.\s0
|
||||
\&\fBBIO_get_conn_ip_family()\fR returns the IP family of the connect BIO.
|
||||
.PP
|
||||
\&\fBBIO_set_nbio()\fR sets the non blocking I/O flag to \fBn\fR. If \fBn\fR is
|
||||
zero then blocking I/O is set. If \fBn\fR is 1 then non blocking I/O
|
||||
|
|
@ -227,17 +152,17 @@ is set. Blocking I/O is the default. The call to \fBBIO_set_nbio()\fR
|
|||
should be made before the connection is established because
|
||||
non blocking I/O is set during the connect process.
|
||||
.PP
|
||||
\&\fBBIO_do_connect()\fR attempts to connect the supplied \s-1BIO.\s0
|
||||
This performs an \s-1SSL/TLS\s0 handshake as far as supported by the \s-1BIO.\s0
|
||||
For non-SSL BIOs the connection is done typically at \s-1TCP\s0 level.
|
||||
If domain name resolution yields multiple \s-1IP\s0 addresses all of them are tried
|
||||
\&\fBBIO_do_connect()\fR attempts to connect the supplied BIO.
|
||||
This performs an SSL/TLS handshake as far as supported by the BIO.
|
||||
For non\-SSL BIOs the connection is done typically at TCP level.
|
||||
If domain name resolution yields multiple IP addresses all of them are tried
|
||||
after \fBconnect()\fR failures.
|
||||
The function returns 1 if the connection was established successfully.
|
||||
A zero or negative value is returned if the connection could not be established.
|
||||
The call \fBBIO_should_retry()\fR should be used for non blocking connect BIOs
|
||||
to determine if the call should be retried.
|
||||
If a connection has already been established this call has no effect.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
If blocking I/O is set then a non positive return value from any
|
||||
I/O call is caused by an error condition, although a zero return
|
||||
|
|
@ -246,7 +171,7 @@ will normally mean that the connection was closed.
|
|||
If the port name is supplied as part of the hostname then this will
|
||||
override any value set with \fBBIO_set_conn_port()\fR. This may be undesirable
|
||||
if the application does not wish to allow connection to arbitrary
|
||||
ports. This can be avoided by checking for the presence of the ':'
|
||||
ports. This can be avoided by checking for the presence of the \*(Aq:\*(Aq
|
||||
character in the passed hostname and either indicating an error or
|
||||
truncating the string at that point.
|
||||
.PP
|
||||
|
|
@ -262,7 +187,7 @@ If non blocking I/O is set then retries will be requested as appropriate.
|
|||
.PP
|
||||
It addition to \fBBIO_should_read()\fR and \fBBIO_should_write()\fR it is also
|
||||
possible for \fBBIO_should_io_special()\fR to be true during the initial
|
||||
connection process with the reason \s-1BIO_RR_CONNECT.\s0 If this is returned
|
||||
connection process with the reason BIO_RR_CONNECT. If this is returned
|
||||
then this is an indication that a connection attempt would block,
|
||||
the application should then take appropriate action to wait until
|
||||
the underlying socket has connected and retry the call.
|
||||
|
|
@ -273,29 +198,29 @@ the underlying socket has connected and retry the call.
|
|||
\&\fBBIO_set_nbio()\fR, and \fBBIO_do_connect()\fR are macros.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_s_connect()\fR returns the connect \s-1BIO\s0 method.
|
||||
\&\fBBIO_s_connect()\fR returns the connect BIO method.
|
||||
.PP
|
||||
\&\fBBIO_set_conn_address()\fR, \fBBIO_set_conn_port()\fR, and \fBBIO_set_conn_ip_family()\fR
|
||||
return 1 or <=0 if an error occurs.
|
||||
.PP
|
||||
\&\fBBIO_set_conn_hostname()\fR returns 1 on success and <=0 on failure.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_address()\fR returns the address information or \s-1NULL\s0 if none
|
||||
\&\fBBIO_get_conn_address()\fR returns the address information or NULL if none
|
||||
was set.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_hostname()\fR returns the connected hostname or \s-1NULL\s0 if
|
||||
\&\fBBIO_get_conn_hostname()\fR returns the connected hostname or NULL if
|
||||
none was set.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_ip_family()\fR returns the address family or \-1 if none was set.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_port()\fR returns a string representing the connected
|
||||
port or \s-1NULL\s0 if not set.
|
||||
port or NULL if not set.
|
||||
.PP
|
||||
\&\fBBIO_set_nbio()\fR returns 1 or <=0 if an error occurs.
|
||||
.PP
|
||||
\&\fBBIO_do_connect()\fR returns 1 if the connection was successfully
|
||||
established and <=0 if the connection failed.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
This is example connects to a webserver on the local host and attempts
|
||||
to retrieve a page and copy the result to standard output.
|
||||
|
|
@ -324,17 +249,17 @@ to retrieve a page and copy the result to standard output.
|
|||
.Ve
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\s-1\fBBIO_ADDR\s0\fR\|(3), \fBBIO_parse_hostserv\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
\&\fBBIO_ADDR\fR\|(3), \fBBIO_parse_hostserv\fR\|(3)
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBIO_set_conn_int_port()\fR, \fBBIO_get_conn_int_port()\fR, \fBBIO_set_conn_ip()\fR, and \fBBIO_get_conn_ip()\fR
|
||||
were removed in OpenSSL 1.1.0.
|
||||
Use \fBBIO_set_conn_address()\fR and \fBBIO_get_conn_address()\fR instead.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_CORE 3ossl"
|
||||
.TH BIO_S_CORE 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_CORE 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_core, BIO_new_from_core_bio \- OSSL_CORE_BIO functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -149,38 +74,38 @@ BIO_s_core, BIO_new_from_core_bio \- OSSL_CORE_BIO functions
|
|||
\&
|
||||
\& BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_core()\fR returns the core \s-1BIO\s0 method function.
|
||||
\&\fBBIO_s_core()\fR returns the core BIO method function.
|
||||
.PP
|
||||
A core \s-1BIO\s0 is treated as source/sink \s-1BIO\s0 which communicates to some external
|
||||
\&\s-1BIO.\s0 This is primarily useful to provider authors. A number of calls from
|
||||
libcrypto into a provider supply an \s-1OSSL_CORE_BIO\s0 parameter. This represents
|
||||
a \s-1BIO\s0 within libcrypto, but cannot be used directly by a provider. Instead it
|
||||
A core BIO is treated as source/sink BIO which communicates to some external
|
||||
BIO. This is primarily useful to provider authors. A number of calls from
|
||||
libcrypto into a provider supply an OSSL_CORE_BIO parameter. This represents
|
||||
a BIO within libcrypto, but cannot be used directly by a provider. Instead it
|
||||
should be wrapped using a \fBBIO_s_core()\fR.
|
||||
.PP
|
||||
Once a \s-1BIO\s0 is constructed based on \fBBIO_s_core()\fR, the associated \s-1OSSL_CORE_BIO\s0
|
||||
object should be set on it using \fBBIO_set_data\fR\|(3). Note that the \s-1BIO\s0 will only
|
||||
Once a BIO is constructed based on \fBBIO_s_core()\fR, the associated OSSL_CORE_BIO
|
||||
object should be set on it using \fBBIO_set_data\fR\|(3). Note that the BIO will only
|
||||
operate correctly if it is associated with a library context constructed using
|
||||
\&\fBOSSL_LIB_CTX_new_from_dispatch\fR\|(3). To associate the \s-1BIO\s0 with a library context
|
||||
\&\fBOSSL_LIB_CTX_new_from_dispatch\fR\|(3). To associate the BIO with a library context
|
||||
construct it using \fBBIO_new_ex\fR\|(3).
|
||||
.PP
|
||||
\&\fBBIO_new_from_core_bio()\fR is a convenience function that constructs a new \s-1BIO\s0
|
||||
\&\fBBIO_new_from_core_bio()\fR is a convenience function that constructs a new BIO
|
||||
based on \fBBIO_s_core()\fR and that is associated with the given library context. It
|
||||
then also sets the \s-1OSSL_CORE_BIO\s0 object on the \s-1BIO\s0 using \fBBIO_set_data\fR\|(3).
|
||||
then also sets the OSSL_CORE_BIO object on the BIO using \fBBIO_set_data\fR\|(3).
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_s_core()\fR return a core \s-1BIO\s0 \fB\s-1BIO_METHOD\s0\fR structure.
|
||||
\&\fBBIO_s_core()\fR return a core BIO \fBBIO_METHOD\fR structure.
|
||||
.PP
|
||||
\&\fBBIO_new_from_core_bio()\fR returns a \s-1BIO\s0 structure on success or \s-1NULL\s0 on failure.
|
||||
\&\fBBIO_new_from_core_bio()\fR returns a BIO structure on success or NULL on failure.
|
||||
A failure will most commonly be because the library context was not constructed
|
||||
using \fBOSSL_LIB_CTX_new_from_dispatch\fR\|(3).
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBIO_s_core()\fR and \fBBIO_new_from_core_bio()\fR were added in OpenSSL 3.0.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
Create a core \s-1BIO\s0 and write some data to it:
|
||||
Create a core BIO and write some data to it:
|
||||
.PP
|
||||
.Vb 2
|
||||
\& int some_function(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio) {
|
||||
|
|
@ -195,11 +120,11 @@ Create a core \s-1BIO\s0 and write some data to it:
|
|||
\& return 1;
|
||||
\& }
|
||||
.Ve
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2021\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_DATAGRAM 3ossl"
|
||||
.TH BIO_S_DATAGRAM 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_DATAGRAM 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_datagram, BIO_new_dgram,
|
||||
BIO_ctrl_dgram_connect,
|
||||
BIO_ctrl_set_connected,
|
||||
|
|
@ -147,7 +72,7 @@ BIO_dgram_send_timedout,
|
|||
BIO_dgram_get_peer,
|
||||
BIO_dgram_set_peer,
|
||||
BIO_dgram_get_mtu_overhead \- Network BIO with datagram semantics
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -163,10 +88,10 @@ BIO_dgram_get_mtu_overhead \- Network BIO with datagram semantics
|
|||
\& int BIO_dgram_set_peer(BIO *bio, const BIO_ADDR *peer);
|
||||
\& int BIO_dgram_get_mtu_overhead(BIO *bio);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_datagram()\fR is a \s-1BIO\s0 implementation designed for use with network sockets
|
||||
which provide datagram semantics, such as \s-1UDP\s0 sockets. It is suitable for use
|
||||
\&\fBBIO_s_datagram()\fR is a BIO implementation designed for use with network sockets
|
||||
which provide datagram semantics, such as UDP sockets. It is suitable for use
|
||||
with DTLSv1.
|
||||
.PP
|
||||
Because \fBBIO_s_datagram()\fR has datagram semantics, a single \fBBIO_write()\fR call sends
|
||||
|
|
@ -175,18 +100,18 @@ the size of the buffer passed to \fBBIO_read()\fR is inadequate, the datagram is
|
|||
silently truncated.
|
||||
.PP
|
||||
When using \fBBIO_s_datagram()\fR, it is important to note that:
|
||||
.IP "\(bu" 4
|
||||
This \s-1BIO\s0 can be used with either a connected or unconnected network socket. A
|
||||
.IP \(bu 4
|
||||
This BIO can be used with either a connected or unconnected network socket. A
|
||||
connected socket is a network socket which has had \fBBIO_connect\fR\|(3) or a
|
||||
similar OS-specific function called on it. Such a socket can only receive
|
||||
similar OS\-specific function called on it. Such a socket can only receive
|
||||
datagrams from the specified peer. Any other socket is an unconnected socket and
|
||||
can receive datagrams from any host.
|
||||
.IP "\(bu" 4
|
||||
.IP \(bu 4
|
||||
Despite their naming,
|
||||
neither \fBBIO_ctrl_dgram_connect()\fR nor \fBBIO_ctrl_set_connected()\fR cause a socket
|
||||
to become connected. These controls are provided to indicate to the \s-1BIO\s0 how
|
||||
to become connected. These controls are provided to indicate to the BIO how
|
||||
the underlying socket is configured and how it is to be used; see below.
|
||||
.IP "\(bu" 4
|
||||
.IP \(bu 4
|
||||
Use of \fBBIO_s_datagram()\fR with an unconnected network socket is hazardous hecause
|
||||
any successful call to \fBBIO_read()\fR results in the peer address used for any
|
||||
subsequent call to \fBBIO_write()\fR being set to the source address of the datagram
|
||||
|
|
@ -200,62 +125,62 @@ discussion.
|
|||
.PP
|
||||
Various controls are available for configuring the \fBBIO_s_datagram()\fR using
|
||||
\&\fBBIO_ctrl\fR\|(3):
|
||||
.IP "BIO_ctrl_dgram_connect (\s-1BIO_CTRL_DGRAM_CONNECT\s0)" 4
|
||||
.IP "BIO_ctrl_dgram_connect (BIO_CTRL_DGRAM_CONNECT)" 4
|
||||
.IX Item "BIO_ctrl_dgram_connect (BIO_CTRL_DGRAM_CONNECT)"
|
||||
This is equivalent to calling \fBBIO_dgram_set_peer\fR\|(3).
|
||||
.Sp
|
||||
Despite its name, this function does not cause the underlying socket to become
|
||||
connected.
|
||||
.IP "BIO_ctrl_set_connected (\s-1BIO_CTRL_SET_CONNECTED\s0)" 4
|
||||
.IP "BIO_ctrl_set_connected (BIO_CTRL_SET_CONNECTED)" 4
|
||||
.IX Item "BIO_ctrl_set_connected (BIO_CTRL_SET_CONNECTED)"
|
||||
This informs the \fBBIO_s_datagram()\fR whether the underlying socket has been
|
||||
connected, and therefore how the \fBBIO_s_datagram()\fR should attempt to use the
|
||||
socket.
|
||||
.Sp
|
||||
If the \fIpeer\fR argument is non-NULL, \fBBIO_s_datagram()\fR assumes that the
|
||||
underlying socket has been connected and will attempt to use the socket using \s-1OS\s0
|
||||
If the \fIpeer\fR argument is non\-NULL, \fBBIO_s_datagram()\fR assumes that the
|
||||
underlying socket has been connected and will attempt to use the socket using OS
|
||||
APIs which do not specify peer addresses (for example, \fBsend\fR\|(3) and \fBrecv\fR\|(3) or
|
||||
similar). The \fIpeer\fR argument should specify the peer address to which the socket
|
||||
is connected.
|
||||
.Sp
|
||||
If the \fIpeer\fR argument is \s-1NULL,\s0 \fBBIO_s_datagram()\fR assumes that the underlying
|
||||
socket is not connected and will attempt to use the socket using an \s-1OS\s0 APIs
|
||||
If the \fIpeer\fR argument is NULL, \fBBIO_s_datagram()\fR assumes that the underlying
|
||||
socket is not connected and will attempt to use the socket using an OS APIs
|
||||
which specify peer addresses (for example, \fBsendto\fR\|(3) and \fBrecvfrom\fR\|(3)).
|
||||
.IP "BIO_dgram_get_peer (\s-1BIO_CTRL_DGRAM_GET_PEER\s0)" 4
|
||||
.IP "BIO_dgram_get_peer (BIO_CTRL_DGRAM_GET_PEER)" 4
|
||||
.IX Item "BIO_dgram_get_peer (BIO_CTRL_DGRAM_GET_PEER)"
|
||||
This outputs a \fB\s-1BIO_ADDR\s0\fR which specifies one of the following values,
|
||||
This outputs a \fBBIO_ADDR\fR which specifies one of the following values,
|
||||
whichever happened most recently:
|
||||
.RS 4
|
||||
.IP "\(bu" 4
|
||||
.IP \(bu 4
|
||||
The peer address last passed to \fBBIO_dgram_set_peer()\fR, \fBBIO_ctrl_dgram_connect()\fR
|
||||
or \fBBIO_ctrl_set_connected()\fR.
|
||||
.IP "\(bu" 4
|
||||
.IP \(bu 4
|
||||
The peer address of the datagram last received by a call to \fBBIO_read()\fR.
|
||||
.RE
|
||||
.RS 4
|
||||
.RE
|
||||
.IP "BIO_dgram_set_peer (\s-1BIO_CTRL_DGRAM_SET_PEER\s0)" 4
|
||||
.IP "BIO_dgram_set_peer (BIO_CTRL_DGRAM_SET_PEER)" 4
|
||||
.IX Item "BIO_dgram_set_peer (BIO_CTRL_DGRAM_SET_PEER)"
|
||||
Sets the peer address to be used for subsequent writes to this \s-1BIO.\s0
|
||||
Sets the peer address to be used for subsequent writes to this BIO.
|
||||
.Sp
|
||||
Warning: When used with an unconnected network socket, the value set may be
|
||||
modified by future calls to \fBBIO_read\fR\|(3), making use of \fBBIO_s_datagram()\fR
|
||||
hazardous when used with unconnected network sockets; see above.
|
||||
.IP "BIO_dgram_recv_timeout (\s-1BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP\s0)" 4
|
||||
.IP "BIO_dgram_recv_timeout (BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP)" 4
|
||||
.IX Item "BIO_dgram_recv_timeout (BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP)"
|
||||
Returns 1 if the last I/O operation performed on the \s-1BIO\s0 (for example, via a
|
||||
Returns 1 if the last I/O operation performed on the BIO (for example, via a
|
||||
call to \fBBIO_read\fR\|(3)) may have been caused by a receive timeout.
|
||||
.IP "BIO_dgram_send_timedout (\s-1BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP\s0)" 4
|
||||
.IP "BIO_dgram_send_timedout (BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP)" 4
|
||||
.IX Item "BIO_dgram_send_timedout (BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP)"
|
||||
Returns 1 if the last I/O operation performed on the \s-1BIO\s0 (for example, via a
|
||||
Returns 1 if the last I/O operation performed on the BIO (for example, via a
|
||||
call to \fBBIO_write\fR\|(3)) may have been caused by a send timeout.
|
||||
.IP "BIO_dgram_get_mtu_overhead (\s-1BIO_CTRL_DGRAM_GET_MTU_OVERHEAD\s0)" 4
|
||||
.IP "BIO_dgram_get_mtu_overhead (BIO_CTRL_DGRAM_GET_MTU_OVERHEAD)" 4
|
||||
.IX Item "BIO_dgram_get_mtu_overhead (BIO_CTRL_DGRAM_GET_MTU_OVERHEAD)"
|
||||
Returns a quantity in bytes which is a rough estimate of the number of bytes of
|
||||
overhead which should typically be added to a datagram payload size in order to
|
||||
estimate the final size of the Layer 3 (e.g. \s-1IP\s0) packet which will contain the
|
||||
estimate the final size of the Layer 3 (e.g. IP) packet which will contain the
|
||||
datagram. In most cases, the maximum datagram payload size which can be
|
||||
transmitted can be determined by determining the link \s-1MTU\s0 in bytes and
|
||||
transmitted can be determined by determining the link MTU in bytes and
|
||||
subtracting the value returned by this call.
|
||||
.Sp
|
||||
The value returned by this call depends on the network layer protocol being
|
||||
|
|
@ -264,42 +189,42 @@ used.
|
|||
The value returned is not fully reliable because datagram overheads can be
|
||||
higher in atypical network configurations, for example where IPv6 extension
|
||||
headers or IPv4 options are used.
|
||||
.IP "\s-1BIO_CTRL_DGRAM_SET_DONT_FRAG\s0" 4
|
||||
.IP BIO_CTRL_DGRAM_SET_DONT_FRAG 4
|
||||
.IX Item "BIO_CTRL_DGRAM_SET_DONT_FRAG"
|
||||
If \fInum\fR is nonzero, configures the underlying network socket to enable Don't
|
||||
Fragment mode, in which datagrams will be set with the \s-1IP\s0 Don't Fragment (\s-1DF\s0)
|
||||
bit set. If \fInum\fR is zero, Don't Fragment mode is disabled.
|
||||
.IP "\s-1BIO_CTRL_DGRAM_QUERY_MTU\s0" 4
|
||||
If \fInum\fR is nonzero, configures the underlying network socket to enable Don\*(Aqt
|
||||
Fragment mode, in which datagrams will be set with the IP Don\*(Aqt Fragment (DF)
|
||||
bit set. If \fInum\fR is zero, Don\*(Aqt Fragment mode is disabled.
|
||||
.IP BIO_CTRL_DGRAM_QUERY_MTU 4
|
||||
.IX Item "BIO_CTRL_DGRAM_QUERY_MTU"
|
||||
Queries the \s-1OS\s0 for its assessment of the Path \s-1MTU\s0 for the destination to which
|
||||
the underlying network socket, and returns that Path \s-1MTU\s0 in bytes. This control
|
||||
Queries the OS for its assessment of the Path MTU for the destination to which
|
||||
the underlying network socket, and returns that Path MTU in bytes. This control
|
||||
can only be used with a connected socket.
|
||||
.Sp
|
||||
This is not supported on all platforms and depends on \s-1OS\s0 support being
|
||||
This is not supported on all platforms and depends on OS support being
|
||||
available. Returns 0 on failure.
|
||||
.IP "\s-1BIO_CTRL_DGRAM_MTU_DISCOVER\s0" 4
|
||||
.IP BIO_CTRL_DGRAM_MTU_DISCOVER 4
|
||||
.IX Item "BIO_CTRL_DGRAM_MTU_DISCOVER"
|
||||
This control requests that Path \s-1MTU\s0 discovery be enabled on the underlying
|
||||
This control requests that Path MTU discovery be enabled on the underlying
|
||||
network socket.
|
||||
.IP "\s-1BIO_CTRL_DGRAM_GET_FALLBACK_MTU\s0" 4
|
||||
.IP BIO_CTRL_DGRAM_GET_FALLBACK_MTU 4
|
||||
.IX Item "BIO_CTRL_DGRAM_GET_FALLBACK_MTU"
|
||||
Returns the estimated minimum size of datagram payload which should always be
|
||||
supported on the \s-1BIO.\s0 This size is determined by the minimum \s-1MTU\s0 required to be
|
||||
supported on the BIO. This size is determined by the minimum MTU required to be
|
||||
supported by the applicable underlying network layer. Use of datagrams of this
|
||||
size may lead to suboptimal performance, but should be routable in all
|
||||
circumstances. The value returned is the datagram payload size in bytes and does
|
||||
not include the size of layer 3 or layer 4 protocol headers.
|
||||
.IP "\s-1BIO_CTRL_DGRAM_MTU_EXCEEDED\s0" 4
|
||||
.IP BIO_CTRL_DGRAM_MTU_EXCEEDED 4
|
||||
.IX Item "BIO_CTRL_DGRAM_MTU_EXCEEDED"
|
||||
Returns 1 if the last attempted write to the \s-1BIO\s0 failed due to the size of the
|
||||
attempted write exceeding the applicable \s-1MTU.\s0
|
||||
.IP "\s-1BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT\s0" 4
|
||||
Returns 1 if the last attempted write to the BIO failed due to the size of the
|
||||
attempted write exceeding the applicable MTU.
|
||||
.IP BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 4
|
||||
.IX Item "BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT"
|
||||
Accepts a pointer to a \fBstruct timeval\fR. If the time specified is zero,
|
||||
disables receive timeouts. Otherwise, configures the specified time interval as
|
||||
the receive timeout for the socket for the purposes of future \fBBIO_read\fR\|(3)
|
||||
calls.
|
||||
.IP "\s-1BIO_CTRL_DGRAM_SET_PEEK_MODE\s0" 4
|
||||
.IP BIO_CTRL_DGRAM_SET_PEEK_MODE 4
|
||||
.IX Item "BIO_CTRL_DGRAM_SET_PEEK_MODE"
|
||||
If \fBnum\fR is nonzero, enables peek mode; otherwise, disables peek mode. Where
|
||||
peek mode is enabled, calls to \fBBIO_read\fR\|(3) read datagrams from the underlying
|
||||
|
|
@ -307,12 +232,12 @@ network socket in peek mode, meaning that a future call to \fBBIO_read\fR\|(3) w
|
|||
yield the same datagram until peek mode is disabled.
|
||||
.PP
|
||||
\&\fBBIO_new_dgram()\fR is a helper function which instantiates a \fBBIO_s_datagram()\fR and
|
||||
sets the \s-1BIO\s0 to use the socket given in \fIfd\fR by calling \fBBIO_set_fd()\fR.
|
||||
sets the BIO to use the socket given in \fIfd\fR by calling \fBBIO_set_fd()\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_s_datagram()\fR returns a \s-1BIO\s0 method.
|
||||
\&\fBBIO_s_datagram()\fR returns a BIO method.
|
||||
.PP
|
||||
\&\fBBIO_new_dgram()\fR returns a \s-1BIO\s0 on success and \s-1NULL\s0 on failure.
|
||||
\&\fBBIO_new_dgram()\fR returns a BIO on success and NULL on failure.
|
||||
.PP
|
||||
\&\fBBIO_ctrl_dgram_connect()\fR, \fBBIO_ctrl_set_connected()\fR,
|
||||
\&\fBBIO_dgram_get_peer()\fR, \fBBIO_dgram_set_peer()\fR return 1 on success and 0 on failure.
|
||||
|
|
@ -324,11 +249,11 @@ on the circumstance; see discussion above.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBDTLSv1_listen\fR\|(3), \fBbio\fR\|(7)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2022\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_FD 3ossl"
|
||||
.TH BIO_S_FD 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_FD 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd \- file descriptor BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -152,16 +77,16 @@ BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd \- file descriptor BIO
|
|||
\&
|
||||
\& BIO *BIO_new_fd(int fd, int close_flag);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_fd()\fR returns the file descriptor \s-1BIO\s0 method. This is a wrapper
|
||||
\&\fBBIO_s_fd()\fR returns the file descriptor BIO method. This is a wrapper
|
||||
round the platforms file descriptor routines such as \fBread()\fR and \fBwrite()\fR.
|
||||
.PP
|
||||
\&\fBBIO_read_ex()\fR and \fBBIO_write_ex()\fR read or write the underlying descriptor.
|
||||
\&\fBBIO_puts()\fR is supported but \fBBIO_gets()\fR is not.
|
||||
.PP
|
||||
If the close flag is set then \fBclose()\fR is called on the underlying
|
||||
file descriptor when the \s-1BIO\s0 is freed.
|
||||
file descriptor when the BIO is freed.
|
||||
.PP
|
||||
\&\fBBIO_reset()\fR attempts to change the file pointer to the start of file
|
||||
such as by using \fBlseek(fd, 0, 0)\fR.
|
||||
|
|
@ -172,18 +97,18 @@ such as by using \fBlseek(fd, ofs, 0)\fR.
|
|||
\&\fBBIO_tell()\fR returns the current file position such as by calling
|
||||
\&\fBlseek(fd, 0, 1)\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_fd()\fR sets the file descriptor of \s-1BIO\s0 \fBb\fR to \fBfd\fR and the close
|
||||
\&\fBBIO_set_fd()\fR sets the file descriptor of BIO \fBb\fR to \fBfd\fR and the close
|
||||
flag to \fBc\fR.
|
||||
.PP
|
||||
\&\fBBIO_get_fd()\fR places the file descriptor of \s-1BIO\s0 \fBb\fR in \fBc\fR if it is not \s-1NULL.\s0
|
||||
\&\fBBIO_get_fd()\fR places the file descriptor of BIO \fBb\fR in \fBc\fR if it is not NULL.
|
||||
It also returns the file descriptor.
|
||||
.PP
|
||||
\&\fBBIO_new_fd()\fR returns a file descriptor \s-1BIO\s0 using \fBfd\fR and \fBclose_flag\fR.
|
||||
.SH "NOTES"
|
||||
\&\fBBIO_new_fd()\fR returns a file descriptor BIO using \fBfd\fR and \fBclose_flag\fR.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The behaviour of \fBBIO_read_ex()\fR and \fBBIO_write_ex()\fR depends on the behavior of the
|
||||
platforms \fBread()\fR and \fBwrite()\fR calls on the descriptor. If the underlying
|
||||
file descriptor is in a non blocking mode then the \s-1BIO\s0 will behave in the
|
||||
file descriptor is in a non blocking mode then the BIO will behave in the
|
||||
manner described in the \fBBIO_read_ex\fR\|(3) and \fBBIO_should_retry\fR\|(3)
|
||||
manual pages.
|
||||
.PP
|
||||
|
|
@ -193,18 +118,18 @@ instead.
|
|||
\&\fBBIO_set_fd()\fR and \fBBIO_get_fd()\fR are implemented as macros.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_s_fd()\fR returns the file descriptor \s-1BIO\s0 method.
|
||||
\&\fBBIO_s_fd()\fR returns the file descriptor BIO method.
|
||||
.PP
|
||||
\&\fBBIO_set_fd()\fR returns 1 on success or <=0 for failure.
|
||||
.PP
|
||||
\&\fBBIO_get_fd()\fR returns the file descriptor or \-1 if the \s-1BIO\s0 has not
|
||||
\&\fBBIO_get_fd()\fR returns the file descriptor or \-1 if the BIO has not
|
||||
been initialized. It also returns zero and negative values if other error occurs.
|
||||
.PP
|
||||
\&\fBBIO_new_fd()\fR returns the newly allocated \s-1BIO\s0 or \s-1NULL\s0 is an error
|
||||
\&\fBBIO_new_fd()\fR returns the newly allocated BIO or NULL is an error
|
||||
occurred.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
This is a file descriptor \s-1BIO\s0 version of \*(L"Hello World\*(R":
|
||||
This is a file descriptor BIO version of "Hello World":
|
||||
.PP
|
||||
.Vb 1
|
||||
\& BIO *out;
|
||||
|
|
@ -220,11 +145,11 @@ This is a file descriptor \s-1BIO\s0 version of \*(L"Hello World\*(R":
|
|||
\&\fBBIO_write_ex\fR\|(3), \fBBIO_puts\fR\|(3),
|
||||
\&\fBBIO_gets\fR\|(3), \fBBIO_printf\fR\|(3),
|
||||
\&\fBBIO_set_close\fR\|(3), \fBBIO_get_close\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_FILE 3ossl"
|
||||
.TH BIO_S_FILE 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_FILE 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_file, BIO_new_file, BIO_new_fp, BIO_set_fp, BIO_get_fp,
|
||||
BIO_read_filename, BIO_write_filename, BIO_append_filename,
|
||||
BIO_rw_filename \- FILE bio
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -159,16 +84,16 @@ BIO_rw_filename \- FILE bio
|
|||
\& int BIO_append_filename(BIO *b, char *name);
|
||||
\& int BIO_rw_filename(BIO *b, char *name);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_file()\fR returns the \s-1BIO\s0 file method. As its name implies it
|
||||
is a wrapper round the stdio \s-1FILE\s0 structure and it is a
|
||||
source/sink \s-1BIO.\s0
|
||||
\&\fBBIO_s_file()\fR returns the BIO file method. As its name implies it
|
||||
is a wrapper round the stdio FILE structure and it is a
|
||||
source/sink BIO.
|
||||
.PP
|
||||
Calls to \fBBIO_read_ex()\fR and \fBBIO_write_ex()\fR read and write data to the
|
||||
underlying stream. \fBBIO_gets()\fR and \fBBIO_puts()\fR are supported on file BIOs.
|
||||
.PP
|
||||
\&\fBBIO_flush()\fR on a file \s-1BIO\s0 calls the \fBfflush()\fR function on the wrapped
|
||||
\&\fBBIO_flush()\fR on a file BIO calls the \fBfflush()\fR function on the wrapped
|
||||
stream.
|
||||
.PP
|
||||
\&\fBBIO_reset()\fR attempts to change the file pointer to the start of file
|
||||
|
|
@ -179,22 +104,22 @@ using fseek(stream, ofs, 0).
|
|||
.PP
|
||||
\&\fBBIO_eof()\fR calls \fBfeof()\fR.
|
||||
.PP
|
||||
Setting the \s-1BIO_CLOSE\s0 flag calls \fBfclose()\fR on the stream when the \s-1BIO\s0
|
||||
Setting the BIO_CLOSE flag calls \fBfclose()\fR on the stream when the BIO
|
||||
is freed.
|
||||
.PP
|
||||
\&\fBBIO_new_file()\fR creates a new file \s-1BIO\s0 with mode \fBmode\fR the meaning
|
||||
of \fBmode\fR is the same as the stdio function \fBfopen()\fR. The \s-1BIO_CLOSE\s0
|
||||
flag is set on the returned \s-1BIO.\s0
|
||||
\&\fBBIO_new_file()\fR creates a new file BIO with mode \fBmode\fR the meaning
|
||||
of \fBmode\fR is the same as the stdio function \fBfopen()\fR. The BIO_CLOSE
|
||||
flag is set on the returned BIO.
|
||||
.PP
|
||||
\&\fBBIO_new_fp()\fR creates a file \s-1BIO\s0 wrapping \fBstream\fR. Flags can be:
|
||||
\&\s-1BIO_CLOSE, BIO_NOCLOSE\s0 (the close flag) \s-1BIO_FP_TEXT\s0 (sets the underlying
|
||||
\&\fBBIO_new_fp()\fR creates a file BIO wrapping \fBstream\fR. Flags can be:
|
||||
BIO_CLOSE, BIO_NOCLOSE (the close flag) BIO_FP_TEXT (sets the underlying
|
||||
stream to text mode, default is binary: this only has any effect under
|
||||
Win32).
|
||||
.PP
|
||||
\&\fBBIO_set_fp()\fR sets the fp of a file \s-1BIO\s0 to \fBfp\fR. \fBflags\fR has the same
|
||||
\&\fBBIO_set_fp()\fR sets the fp of a file BIO to \fBfp\fR. \fBflags\fR has the same
|
||||
meaning as in \fBBIO_new_fp()\fR, it is a macro.
|
||||
.PP
|
||||
\&\fBBIO_get_fp()\fR retrieves the fp of a file \s-1BIO,\s0 it is a macro.
|
||||
\&\fBBIO_get_fp()\fR retrieves the fp of a file BIO, it is a macro.
|
||||
.PP
|
||||
\&\fBBIO_seek()\fR is a macro that sets the position pointer to \fBoffset\fR bytes
|
||||
from the start of file.
|
||||
|
|
@ -202,24 +127,24 @@ from the start of file.
|
|||
\&\fBBIO_tell()\fR returns the value of the position pointer.
|
||||
.PP
|
||||
\&\fBBIO_read_filename()\fR, \fBBIO_write_filename()\fR, \fBBIO_append_filename()\fR and
|
||||
\&\fBBIO_rw_filename()\fR set the file \s-1BIO\s0 \fBb\fR to use file \fBname\fR for
|
||||
\&\fBBIO_rw_filename()\fR set the file BIO \fBb\fR to use file \fBname\fR for
|
||||
reading, writing, append or read write respectively.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
When wrapping stdout, stdin or stderr the underlying stream should not
|
||||
normally be closed so the \s-1BIO_NOCLOSE\s0 flag should be set.
|
||||
normally be closed so the BIO_NOCLOSE flag should be set.
|
||||
.PP
|
||||
Because the file \s-1BIO\s0 calls the underlying stdio functions any quirks
|
||||
in stdio behaviour will be mirrored by the corresponding \s-1BIO.\s0
|
||||
Because the file BIO calls the underlying stdio functions any quirks
|
||||
in stdio behaviour will be mirrored by the corresponding BIO.
|
||||
.PP
|
||||
On Windows BIO_new_files reserves for the filename argument to be
|
||||
\&\s-1UTF\-8\s0 encoded. In other words if you have to make it work in multi\-
|
||||
lingual environment, encode filenames in \s-1UTF\-8.\s0
|
||||
UTF\-8 encoded. In other words if you have to make it work in multi\-
|
||||
lingual environment, encode filenames in UTF\-8.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_s_file()\fR returns the file \s-1BIO\s0 method.
|
||||
\&\fBBIO_s_file()\fR returns the file BIO method.
|
||||
.PP
|
||||
\&\fBBIO_new_file()\fR and \fBBIO_new_fp()\fR return a file \s-1BIO\s0 or \s-1NULL\s0 if an error
|
||||
\&\fBBIO_new_file()\fR and \fBBIO_new_fp()\fR return a file BIO or NULL if an error
|
||||
occurred.
|
||||
.PP
|
||||
\&\fBBIO_set_fp()\fR and \fBBIO_get_fp()\fR return 1 for success or <=0 for failure
|
||||
|
|
@ -231,9 +156,9 @@ occurred.
|
|||
.PP
|
||||
\&\fBBIO_read_filename()\fR, \fBBIO_write_filename()\fR, \fBBIO_append_filename()\fR and
|
||||
\&\fBBIO_rw_filename()\fR return 1 for success or <=0 for failure.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
File \s-1BIO\s0 \*(L"hello world\*(R":
|
||||
File BIO "hello world":
|
||||
.PP
|
||||
.Vb 1
|
||||
\& BIO *bio_out;
|
||||
|
|
@ -280,11 +205,11 @@ Alternative technique:
|
|||
\& BIO_printf(out, "Hello World\en");
|
||||
\& BIO_free(out);
|
||||
.Ve
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
\&\fBBIO_reset()\fR and \fBBIO_seek()\fR are implemented using \fBfseek()\fR on the underlying
|
||||
stream. The return value for \fBfseek()\fR is 0 for success or \-1 if an error
|
||||
occurred this differs from other types of \s-1BIO\s0 which will typically return
|
||||
occurred this differs from other types of BIO which will typically return
|
||||
1 for success and a non positive value if an error occurred.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
|
|
@ -294,11 +219,11 @@ occurred this differs from other types of \s-1BIO\s0 which will typically return
|
|||
\&\fBBIO_write_ex\fR\|(3), \fBBIO_puts\fR\|(3),
|
||||
\&\fBBIO_gets\fR\|(3), \fBBIO_printf\fR\|(3),
|
||||
\&\fBBIO_set_close\fR\|(3), \fBBIO_get_close\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_MEM 3ossl"
|
||||
.TH BIO_S_MEM 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_MEM 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_secmem,
|
||||
BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf,
|
||||
BIO_get_mem_ptr, BIO_new_mem_buf \- memory BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -157,38 +82,38 @@ BIO_get_mem_ptr, BIO_new_mem_buf \- memory BIO
|
|||
\&
|
||||
\& BIO *BIO_new_mem_buf(const void *buf, int len);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_mem()\fR returns the memory \s-1BIO\s0 method function.
|
||||
\&\fBBIO_s_mem()\fR returns the memory BIO method function.
|
||||
.PP
|
||||
A memory \s-1BIO\s0 is a source/sink \s-1BIO\s0 which uses memory for its I/O. Data
|
||||
written to a memory \s-1BIO\s0 is stored in a \s-1BUF_MEM\s0 structure which is extended
|
||||
A memory BIO is a source/sink BIO which uses memory for its I/O. Data
|
||||
written to a memory BIO is stored in a BUF_MEM structure which is extended
|
||||
as appropriate to accommodate the stored data.
|
||||
.PP
|
||||
\&\fBBIO_s_secmem()\fR is like \fBBIO_s_mem()\fR except that the secure heap is used
|
||||
for buffer storage.
|
||||
.PP
|
||||
Any data written to a memory \s-1BIO\s0 can be recalled by reading from it.
|
||||
Unless the memory \s-1BIO\s0 is read only any data read from it is deleted from
|
||||
the \s-1BIO.\s0
|
||||
Any data written to a memory BIO can be recalled by reading from it.
|
||||
Unless the memory BIO is read only any data read from it is deleted from
|
||||
the BIO.
|
||||
.PP
|
||||
Memory BIOs support \fBBIO_gets()\fR and \fBBIO_puts()\fR.
|
||||
.PP
|
||||
If the \s-1BIO_CLOSE\s0 flag is set when a memory \s-1BIO\s0 is freed then the underlying
|
||||
\&\s-1BUF_MEM\s0 structure is also freed.
|
||||
If the BIO_CLOSE flag is set when a memory BIO is freed then the underlying
|
||||
BUF_MEM structure is also freed.
|
||||
.PP
|
||||
Calling \fBBIO_reset()\fR on a read write memory \s-1BIO\s0 clears any data in it if the
|
||||
flag \s-1BIO_FLAGS_NONCLEAR_RST\s0 is not set, otherwise it just restores the read
|
||||
Calling \fBBIO_reset()\fR on a read write memory BIO clears any data in it if the
|
||||
flag BIO_FLAGS_NONCLEAR_RST is not set, otherwise it just restores the read
|
||||
pointer to the state it was just after the last write was performed and the
|
||||
data can be read again. On a read only \s-1BIO\s0 it similarly restores the \s-1BIO\s0 to
|
||||
data can be read again. On a read only BIO it similarly restores the BIO to
|
||||
its original state and the read only data can be read again.
|
||||
.PP
|
||||
\&\fBBIO_eof()\fR is true if no data is in the \s-1BIO.\s0
|
||||
\&\fBBIO_eof()\fR is true if no data is in the BIO.
|
||||
.PP
|
||||
\&\fBBIO_ctrl_pending()\fR returns the number of bytes currently stored.
|
||||
.PP
|
||||
\&\fBBIO_set_mem_eof_return()\fR sets the behaviour of memory \s-1BIO\s0 \fBb\fR when it is
|
||||
empty. If the \fBv\fR is zero then an empty memory \s-1BIO\s0 will return \s-1EOF\s0 (that is
|
||||
\&\fBBIO_set_mem_eof_return()\fR sets the behaviour of memory BIO \fBb\fR when it is
|
||||
empty. If the \fBv\fR is zero then an empty memory BIO will return EOF (that is
|
||||
it will return zero and BIO_should_retry(b) will be false. If \fBv\fR is non
|
||||
zero then it will return \fBv\fR when it is empty and it will set the read retry
|
||||
flag (that is BIO_read_retry(b) is true). To avoid ambiguity with a normal
|
||||
|
|
@ -199,79 +124,79 @@ and returns the total amount of data available. It is implemented as a macro.
|
|||
Note the pointer returned by this call is informative, no transfer of ownership
|
||||
of this memory is implied. See notes on \fBBIO_set_close()\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_mem_buf()\fR sets the internal \s-1BUF_MEM\s0 structure to \fBbm\fR and sets the
|
||||
close flag to \fBc\fR, that is \fBc\fR should be either \s-1BIO_CLOSE\s0 or \s-1BIO_NOCLOSE.\s0
|
||||
\&\fBBIO_set_mem_buf()\fR sets the internal BUF_MEM structure to \fBbm\fR and sets the
|
||||
close flag to \fBc\fR, that is \fBc\fR should be either BIO_CLOSE or BIO_NOCLOSE.
|
||||
It is a macro.
|
||||
.PP
|
||||
\&\fBBIO_get_mem_ptr()\fR places the underlying \s-1BUF_MEM\s0 structure in *\fBpp\fR. It is
|
||||
\&\fBBIO_get_mem_ptr()\fR places the underlying BUF_MEM structure in *\fBpp\fR. It is
|
||||
a macro.
|
||||
.PP
|
||||
\&\fBBIO_new_mem_buf()\fR creates a memory \s-1BIO\s0 using \fBlen\fR bytes of data at \fBbuf\fR,
|
||||
\&\fBBIO_new_mem_buf()\fR creates a memory BIO using \fBlen\fR bytes of data at \fBbuf\fR,
|
||||
if \fBlen\fR is \-1 then the \fBbuf\fR is assumed to be nul terminated and its
|
||||
length is determined by \fBstrlen\fR. The \s-1BIO\s0 is set to a read only state and
|
||||
length is determined by \fBstrlen\fR. The BIO is set to a read only state and
|
||||
as a result cannot be written to. This is useful when some data needs to be
|
||||
made available from a static area of memory in the form of a \s-1BIO.\s0 The
|
||||
made available from a static area of memory in the form of a BIO. The
|
||||
supplied data is read directly from the supplied buffer: it is \fBnot\fR copied
|
||||
first, so the supplied area of memory must be unchanged until the \s-1BIO\s0 is freed.
|
||||
.SH "NOTES"
|
||||
first, so the supplied area of memory must be unchanged until the BIO is freed.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Writes to memory BIOs will always succeed if memory is available: that is
|
||||
their size can grow indefinitely.
|
||||
.PP
|
||||
Every write after partial read (not all data in the memory buffer was read)
|
||||
to a read write memory \s-1BIO\s0 will have to move the unread data with an internal
|
||||
copy operation, if a \s-1BIO\s0 contains a lot of data and it is read in small
|
||||
to a read write memory BIO will have to move the unread data with an internal
|
||||
copy operation, if a BIO contains a lot of data and it is read in small
|
||||
chunks intertwined with writes the operation can be very slow. Adding
|
||||
a buffering \s-1BIO\s0 to the chain can speed up the process.
|
||||
a buffering BIO to the chain can speed up the process.
|
||||
.PP
|
||||
Calling \fBBIO_set_mem_buf()\fR on a \s-1BIO\s0 created with \fBBIO_new_secmem()\fR will
|
||||
Calling \fBBIO_set_mem_buf()\fR on a BIO created with \fBBIO_new_secmem()\fR will
|
||||
give undefined results, including perhaps a program crash.
|
||||
.PP
|
||||
Switching the memory \s-1BIO\s0 from read write to read only is not supported and
|
||||
Switching the memory BIO from read write to read only is not supported and
|
||||
can give undefined results including a program crash. There are two notable
|
||||
exceptions to the rule. The first one is to assign a static memory buffer
|
||||
immediately after \s-1BIO\s0 creation and set the \s-1BIO\s0 as read only.
|
||||
immediately after BIO creation and set the BIO as read only.
|
||||
.PP
|
||||
The other supported sequence is to start with read write \s-1BIO\s0 then temporarily
|
||||
switch it to read only and call \fBBIO_reset()\fR on the read only \s-1BIO\s0 immediately
|
||||
before switching it back to read write. Before the \s-1BIO\s0 is freed it must be
|
||||
The other supported sequence is to start with read write BIO then temporarily
|
||||
switch it to read only and call \fBBIO_reset()\fR on the read only BIO immediately
|
||||
before switching it back to read write. Before the BIO is freed it must be
|
||||
switched back to the read write mode.
|
||||
.PP
|
||||
Calling \fBBIO_get_mem_ptr()\fR on read only \s-1BIO\s0 will return a \s-1BUF_MEM\s0 that
|
||||
Calling \fBBIO_get_mem_ptr()\fR on read only BIO will return a BUF_MEM that
|
||||
contains only the remaining data to be read. If the close status of the
|
||||
\&\s-1BIO\s0 is set to \s-1BIO_NOCLOSE,\s0 before freeing the \s-1BUF_MEM\s0 the data pointer
|
||||
in it must be set to \s-1NULL\s0 as the data pointer does not point to an
|
||||
BIO is set to BIO_NOCLOSE, before freeing the BUF_MEM the data pointer
|
||||
in it must be set to NULL as the data pointer does not point to an
|
||||
allocated memory.
|
||||
.PP
|
||||
Calling \fBBIO_reset()\fR on a read write memory \s-1BIO\s0 with \s-1BIO_FLAGS_NONCLEAR_RST\s0
|
||||
Calling \fBBIO_reset()\fR on a read write memory BIO with BIO_FLAGS_NONCLEAR_RST
|
||||
flag set can have unexpected outcome when the reads and writes to the
|
||||
\&\s-1BIO\s0 are intertwined. As documented above the \s-1BIO\s0 will be reset to the
|
||||
BIO are intertwined. As documented above the BIO will be reset to the
|
||||
state after the last completed write operation. The effects of reads
|
||||
preceding that write operation cannot be undone.
|
||||
.PP
|
||||
Calling \fBBIO_get_mem_ptr()\fR prior to a \fBBIO_reset()\fR call with
|
||||
\&\s-1BIO_FLAGS_NONCLEAR_RST\s0 set has the same effect as a write operation.
|
||||
BIO_FLAGS_NONCLEAR_RST set has the same effect as a write operation.
|
||||
.PP
|
||||
Calling \fBBIO_set_close()\fR with \s-1BIO_NOCLOSE\s0 orphans the \s-1BUF_MEM\s0 internal to the
|
||||
\&\s-1BIO,\s0 _not_ its actual data buffer. See the examples section for the proper
|
||||
Calling \fBBIO_set_close()\fR with BIO_NOCLOSE orphans the BUF_MEM internal to the
|
||||
BIO, _not_ its actual data buffer. See the examples section for the proper
|
||||
method for claiming ownership of the data pointer for a deferred free operation.
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
There should be an option to set the maximum size of a memory \s-1BIO.\s0
|
||||
There should be an option to set the maximum size of a memory BIO.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_s_mem()\fR and \fBBIO_s_secmem()\fR return a valid memory \fB\s-1BIO_METHOD\s0\fR structure.
|
||||
\&\fBBIO_s_mem()\fR and \fBBIO_s_secmem()\fR return a valid memory \fBBIO_METHOD\fR structure.
|
||||
.PP
|
||||
\&\fBBIO_set_mem_eof_return()\fR, \fBBIO_set_mem_buf()\fR and \fBBIO_get_mem_ptr()\fR
|
||||
return 1 on success or a value which is less than or equal to 0 if an error occurred.
|
||||
.PP
|
||||
\&\fBBIO_get_mem_data()\fR returns the total number of bytes available on success,
|
||||
0 if b is \s-1NULL,\s0 or a negative value in case of other errors.
|
||||
0 if b is NULL, or a negative value in case of other errors.
|
||||
.PP
|
||||
\&\fBBIO_new_mem_buf()\fR returns a valid \fB\s-1BIO\s0\fR structure on success or \s-1NULL\s0 on error.
|
||||
.SH "EXAMPLES"
|
||||
\&\fBBIO_new_mem_buf()\fR returns a valid \fBBIO\fR structure on success or NULL on error.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
Create a memory \s-1BIO\s0 and write some data to it:
|
||||
Create a memory BIO and write some data to it:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& BIO *mem = BIO_new(BIO_s_mem());
|
||||
|
|
@ -279,14 +204,14 @@ Create a memory \s-1BIO\s0 and write some data to it:
|
|||
\& BIO_puts(mem, "Hello World\en");
|
||||
.Ve
|
||||
.PP
|
||||
Create a read only memory \s-1BIO:\s0
|
||||
Create a read only memory BIO:
|
||||
.PP
|
||||
.Vb 2
|
||||
\& char data[] = "Hello World";
|
||||
\& BIO *mem = BIO_new_mem_buf(data, \-1);
|
||||
.Ve
|
||||
.PP
|
||||
Extract the \s-1BUF_MEM\s0 structure from a memory \s-1BIO\s0 and then free up the \s-1BIO:\s0
|
||||
Extract the BUF_MEM structure from a memory BIO and then free up the BIO:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& BUF_MEM *bptr;
|
||||
|
|
@ -296,8 +221,8 @@ Extract the \s-1BUF_MEM\s0 structure from a memory \s-1BIO\s0 and then free up t
|
|||
\& BIO_free(mem);
|
||||
.Ve
|
||||
.PP
|
||||
Extract the \s-1BUF_MEM\s0 ptr, claim ownership of the internal data and free the \s-1BIO\s0
|
||||
and \s-1BUF_MEM\s0 structure:
|
||||
Extract the BUF_MEM ptr, claim ownership of the internal data and free the BIO
|
||||
and BUF_MEM structure:
|
||||
.PP
|
||||
.Vb 2
|
||||
\& BUF_MEM *bptr;
|
||||
|
|
@ -312,11 +237,11 @@ and \s-1BUF_MEM\s0 structure:
|
|||
\& ...
|
||||
\& free(data);
|
||||
.Ve
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,91 +53,32 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_NULL 3ossl"
|
||||
.TH BIO_S_NULL 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_NULL 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_null \- null data sink
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
\&
|
||||
\& const BIO_METHOD *BIO_s_null(void);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_null()\fR returns the null sink \s-1BIO\s0 method. Data written to
|
||||
the null sink is discarded, reads return \s-1EOF.\s0
|
||||
.SH "NOTES"
|
||||
\&\fBBIO_s_null()\fR returns the null sink BIO method. Data written to
|
||||
the null sink is discarded, reads return EOF.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
A null sink \s-1BIO\s0 behaves in a similar manner to the Unix /dev/null
|
||||
A null sink BIO behaves in a similar manner to the Unix /dev/null
|
||||
device.
|
||||
.PP
|
||||
A null bio can be placed on the end of a chain to discard any data
|
||||
|
|
@ -161,16 +86,16 @@ passed through it.
|
|||
.PP
|
||||
A null sink is useful if, for example, an application wishes to digest some
|
||||
data by writing through a digest bio but not send the digested data anywhere.
|
||||
Since a \s-1BIO\s0 chain must normally include a source/sink \s-1BIO\s0 this can be achieved
|
||||
by adding a null sink \s-1BIO\s0 to the end of the chain
|
||||
Since a BIO chain must normally include a source/sink BIO this can be achieved
|
||||
by adding a null sink BIO to the end of the chain
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_s_null()\fR returns the null sink \s-1BIO\s0 method.
|
||||
.SH "COPYRIGHT"
|
||||
\&\fBBIO_s_null()\fR returns the null sink BIO method.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_SOCKET 3ossl"
|
||||
.TH BIO_S_SOCKET 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_S_SOCKET 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_s_socket, BIO_new_socket \- socket BIO
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -149,19 +74,19 @@ BIO_s_socket, BIO_new_socket \- socket BIO
|
|||
\&
|
||||
\& BIO *BIO_new_socket(int sock, int close_flag);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_socket()\fR returns the socket \s-1BIO\s0 method. This is a wrapper
|
||||
round the platform's socket routines.
|
||||
\&\fBBIO_s_socket()\fR returns the socket BIO method. This is a wrapper
|
||||
round the platform\*(Aqs socket routines.
|
||||
.PP
|
||||
\&\fBBIO_read_ex()\fR and \fBBIO_write_ex()\fR read or write the underlying socket.
|
||||
\&\fBBIO_puts()\fR is supported but \fBBIO_gets()\fR is not.
|
||||
.PP
|
||||
If the close flag is set then the socket is shut down and closed
|
||||
when the \s-1BIO\s0 is freed.
|
||||
when the BIO is freed.
|
||||
.PP
|
||||
\&\fBBIO_new_socket()\fR returns a socket \s-1BIO\s0 using \fBsock\fR and \fBclose_flag\fR.
|
||||
.SH "NOTES"
|
||||
\&\fBBIO_new_socket()\fR returns a socket BIO using \fBsock\fR and \fBclose_flag\fR.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Socket BIOs also support any relevant functionality of file descriptor
|
||||
BIOs.
|
||||
|
|
@ -172,15 +97,15 @@ Windows is one such platform. Any code mixing the two will not work on
|
|||
all platforms.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_s_socket()\fR returns the socket \s-1BIO\s0 method.
|
||||
\&\fBBIO_s_socket()\fR returns the socket BIO method.
|
||||
.PP
|
||||
\&\fBBIO_new_socket()\fR returns the newly allocated \s-1BIO\s0 or \s-1NULL\s0 is an error
|
||||
\&\fBBIO_new_socket()\fR returns the newly allocated BIO or NULL is an error
|
||||
occurred.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_SET_CALLBACK 3ossl"
|
||||
.TH BIO_SET_CALLBACK 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_SET_CALLBACK 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_set_callback_ex, BIO_get_callback_ex, BIO_set_callback, BIO_get_callback,
|
||||
BIO_set_callback_arg, BIO_get_callback_arg, BIO_debug_callback,
|
||||
BIO_debug_callback_ex, BIO_callback_fn_ex, BIO_callback_fn
|
||||
\&\- BIO callback functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -163,7 +88,7 @@ BIO_debug_callback_ex, BIO_callback_fn_ex, BIO_callback_fn
|
|||
.Ve
|
||||
.PP
|
||||
The following functions have been deprecated since OpenSSL 3.0, and can be
|
||||
hidden entirely by defining \fB\s-1OPENSSL_API_COMPAT\s0\fR with a suitable version value,
|
||||
hidden entirely by defining \fBOPENSSL_API_COMPAT\fR with a suitable version value,
|
||||
see \fBopenssl_user_macros\fR\|(7):
|
||||
.PP
|
||||
.Vb 6
|
||||
|
|
@ -174,14 +99,14 @@ see \fBopenssl_user_macros\fR\|(7):
|
|||
\& long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
|
||||
\& long argl, long ret);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_set_callback_ex()\fR and \fBBIO_get_callback_ex()\fR set and retrieve the \s-1BIO\s0
|
||||
callback. The callback is called during most high-level \s-1BIO\s0 operations. It can
|
||||
be used for debugging purposes to trace operations on a \s-1BIO\s0 or to modify its
|
||||
\&\fBBIO_set_callback_ex()\fR and \fBBIO_get_callback_ex()\fR set and retrieve the BIO
|
||||
callback. The callback is called during most high\-level BIO operations. It can
|
||||
be used for debugging purposes to trace operations on a BIO or to modify its
|
||||
operation.
|
||||
.PP
|
||||
\&\fBBIO_set_callback()\fR and \fBBIO_get_callback()\fR set and retrieve the old format \s-1BIO\s0
|
||||
\&\fBBIO_set_callback()\fR and \fBBIO_get_callback()\fR set and retrieve the old format BIO
|
||||
callback. New code should not use these functions, but they are retained for
|
||||
backwards compatibility. Any callback set via \fBBIO_set_callback_ex()\fR will get
|
||||
called in preference to any set by \fBBIO_set_callback()\fR.
|
||||
|
|
@ -190,8 +115,8 @@ called in preference to any set by \fBBIO_set_callback()\fR.
|
|||
used to set and retrieve an argument for use in the callback.
|
||||
.PP
|
||||
\&\fBBIO_debug_callback_ex()\fR is a standard debugging callback which prints
|
||||
out information relating to each \s-1BIO\s0 operation. If the callback
|
||||
argument is set it is interpreted as a \s-1BIO\s0 to send the information
|
||||
out information relating to each BIO operation. If the callback
|
||||
argument is set it is interpreted as a BIO to send the information
|
||||
to, otherwise stderr is used. The \fBBIO_debug_callback()\fR function is the
|
||||
deprecated version of the same callback for use with the old callback
|
||||
format \fBBIO_set_callback()\fR function.
|
||||
|
|
@ -199,35 +124,35 @@ format \fBBIO_set_callback()\fR function.
|
|||
BIO_callback_fn_ex is the type of the callback function and BIO_callback_fn
|
||||
is the type of the old format callback function. The meaning of each argument
|
||||
is described below:
|
||||
.IP "\fBb\fR" 4
|
||||
.IP \fBb\fR 4
|
||||
.IX Item "b"
|
||||
The \s-1BIO\s0 the callback is attached to is passed in \fBb\fR.
|
||||
.IP "\fBoper\fR" 4
|
||||
The BIO the callback is attached to is passed in \fBb\fR.
|
||||
.IP \fBoper\fR 4
|
||||
.IX Item "oper"
|
||||
\&\fBoper\fR is set to the operation being performed. For some operations
|
||||
the callback is called twice, once before and once after the actual
|
||||
operation, the latter case has \fBoper\fR or'ed with \s-1BIO_CB_RETURN.\s0
|
||||
.IP "\fBlen\fR" 4
|
||||
operation, the latter case has \fBoper\fR or\*(Aqed with BIO_CB_RETURN.
|
||||
.IP \fBlen\fR 4
|
||||
.IX Item "len"
|
||||
The length of the data requested to be read or written. This is only useful if
|
||||
\&\fBoper\fR is \s-1BIO_CB_READ, BIO_CB_WRITE\s0 or \s-1BIO_CB_GETS.\s0
|
||||
\&\fBoper\fR is BIO_CB_READ, BIO_CB_WRITE or BIO_CB_GETS.
|
||||
.IP "\fBargp\fR \fBargi\fR \fBargl\fR" 4
|
||||
.IX Item "argp argi argl"
|
||||
The meaning of the arguments \fBargp\fR, \fBargi\fR and \fBargl\fR depends on
|
||||
the value of \fBoper\fR, that is the operation being performed.
|
||||
.IP "\fBprocessed\fR" 4
|
||||
.IP \fBprocessed\fR 4
|
||||
.IX Item "processed"
|
||||
\&\fBprocessed\fR is a pointer to a location which will be updated with the amount of
|
||||
data that was actually read or written. Only used for \s-1BIO_CB_READ, BIO_CB_WRITE,
|
||||
BIO_CB_GETS\s0 and \s-1BIO_CB_PUTS.\s0
|
||||
.IP "\fBret\fR" 4
|
||||
data that was actually read or written. Only used for BIO_CB_READ, BIO_CB_WRITE,
|
||||
BIO_CB_GETS and BIO_CB_PUTS.
|
||||
.IP \fBret\fR 4
|
||||
.IX Item "ret"
|
||||
\&\fBret\fR is the return value that would be returned to the
|
||||
application if no callback were present. The actual value returned
|
||||
is the return value of the callback itself. In the case of callbacks
|
||||
called before the actual \s-1BIO\s0 operation 1 is placed in \fBret\fR, if
|
||||
called before the actual BIO operation 1 is placed in \fBret\fR, if
|
||||
the return value is not positive it will be immediately returned to
|
||||
the application and the \s-1BIO\s0 operation will not be performed.
|
||||
the application and the BIO operation will not be performed.
|
||||
.PP
|
||||
The callback should normally simply return \fBret\fR when it has
|
||||
finished processing, unless it specifically wishes to modify the
|
||||
|
|
@ -236,7 +161,7 @@ value returned to the application.
|
|||
.IX Header "CALLBACK OPERATIONS"
|
||||
In the notes below, \fBcallback\fR defers to the actual callback
|
||||
function that is called.
|
||||
.IP "\fBBIO_free(b)\fR" 4
|
||||
.IP \fBBIO_free(b)\fR 4
|
||||
.IX Item "BIO_free(b)"
|
||||
.Vb 1
|
||||
\& callback_ex(b, BIO_CB_FREE, NULL, 0, 0, 0L, 1L, NULL)
|
||||
|
|
@ -352,7 +277,7 @@ or
|
|||
.Ve
|
||||
.Sp
|
||||
after.
|
||||
.IP "\fBBIO_ctrl(\s-1BIO\s0 *b, int cmd, long larg, void *parg)\fR" 4
|
||||
.IP "\fBBIO_ctrl(BIO *b, int cmd, long larg, void *parg)\fR" 4
|
||||
.IX Item "BIO_ctrl(BIO *b, int cmd, long larg, void *parg)"
|
||||
.Vb 1
|
||||
\& callback_ex(b, BIO_CB_CTRL, parg, 0, cmd, larg, 1L, NULL)
|
||||
|
|
@ -378,7 +303,7 @@ or
|
|||
.Sp
|
||||
after.
|
||||
.Sp
|
||||
Note: \fBcmd\fR == \fB\s-1BIO_CTRL_SET_CALLBACK\s0\fR is special, because \fBparg\fR is not the
|
||||
Note: \fBcmd\fR == \fBBIO_CTRL_SET_CALLBACK\fR is special, because \fBparg\fR is not the
|
||||
argument of type \fBBIO_info_cb\fR itself. In this case \fBparg\fR is a pointer to
|
||||
the actual call parameter, see \fBBIO_callback_ctrl\fR.
|
||||
.SH "RETURN VALUES"
|
||||
|
|
@ -390,23 +315,23 @@ respectively.
|
|||
\&\fBBIO_get_callback_arg()\fR returns a \fBchar\fR pointer to the value previously set
|
||||
via a call to \fBBIO_set_callback_arg()\fR.
|
||||
.PP
|
||||
\&\fBBIO_debug_callback()\fR returns 1 or \fBret\fR if it's called after specific \s-1BIO\s0
|
||||
\&\fBBIO_debug_callback()\fR returns 1 or \fBret\fR if it\*(Aqs called after specific BIO
|
||||
operations.
|
||||
.SH "EXAMPLES"
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
The \fBBIO_debug_callback_ex()\fR function is an example, its source is
|
||||
in crypto/bio/bio_cb.c
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBIO_debug_callback_ex()\fR function was added in OpenSSL 3.0.
|
||||
.PP
|
||||
\&\fBBIO_set_callback()\fR, \fBBIO_get_callback()\fR, and \fBBIO_debug_callback()\fR were
|
||||
deprecated in OpenSSL 3.0. Use the non-deprecated _ex functions instead.
|
||||
.SH "COPYRIGHT"
|
||||
deprecated in OpenSSL 3.0. Use the non\-deprecated _ex functions instead.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_SHOULD_RETRY 3ossl"
|
||||
.TH BIO_SHOULD_RETRY 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_SHOULD_RETRY 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_should_read, BIO_should_write,
|
||||
BIO_should_io_special, BIO_retry_type, BIO_should_retry,
|
||||
BIO_get_retry_BIO, BIO_get_retry_reason, BIO_set_retry_reason \- BIO retry
|
||||
functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -158,9 +83,9 @@ functions
|
|||
\& int BIO_get_retry_reason(BIO *bio);
|
||||
\& void BIO_set_retry_reason(BIO *bio, int reason);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions determine why a \s-1BIO\s0 is not able to read or write data.
|
||||
These functions determine why a BIO is not able to read or write data.
|
||||
They will typically be called after a failed \fBBIO_read_ex()\fR or \fBBIO_write_ex()\fR
|
||||
call.
|
||||
.PP
|
||||
|
|
@ -169,58 +94,58 @@ should then be retried at a later time.
|
|||
.PP
|
||||
If \fBBIO_should_retry()\fR is false then the cause is an error condition.
|
||||
.PP
|
||||
\&\fBBIO_should_read()\fR is true if the cause of the condition is that the \s-1BIO\s0
|
||||
\&\fBBIO_should_read()\fR is true if the cause of the condition is that the BIO
|
||||
has insufficient data to return. Check for readability and/or retry the
|
||||
last operation.
|
||||
.PP
|
||||
\&\fBBIO_should_write()\fR is true if the cause of the condition is that the \s-1BIO\s0
|
||||
\&\fBBIO_should_write()\fR is true if the cause of the condition is that the BIO
|
||||
has pending data to write. Check for writability and/or retry the
|
||||
last operation.
|
||||
.PP
|
||||
\&\fBBIO_should_io_special()\fR is true if some \*(L"special\*(R" condition, that is a
|
||||
\&\fBBIO_should_io_special()\fR is true if some "special" condition, that is a
|
||||
reason other than reading or writing is the cause of the condition.
|
||||
.PP
|
||||
\&\fBBIO_retry_type()\fR returns a mask of the cause of a retry condition
|
||||
consisting of the values \fB\s-1BIO_FLAGS_READ\s0\fR, \fB\s-1BIO_FLAGS_WRITE\s0\fR,
|
||||
\&\fB\s-1BIO_FLAGS_IO_SPECIAL\s0\fR though current \s-1BIO\s0 types will only set one of
|
||||
consisting of the values \fBBIO_FLAGS_READ\fR, \fBBIO_FLAGS_WRITE\fR,
|
||||
\&\fBBIO_FLAGS_IO_SPECIAL\fR though current BIO types will only set one of
|
||||
these.
|
||||
.PP
|
||||
\&\fBBIO_get_retry_BIO()\fR determines the precise reason for the special
|
||||
condition, it returns the \s-1BIO\s0 that caused this condition and if
|
||||
\&\fBreason\fR is not \s-1NULL\s0 it contains the reason code. The meaning of
|
||||
condition, it returns the BIO that caused this condition and if
|
||||
\&\fBreason\fR is not NULL it contains the reason code. The meaning of
|
||||
the reason code and the action that should be taken depends on
|
||||
the type of \s-1BIO\s0 that resulted in this condition.
|
||||
the type of BIO that resulted in this condition.
|
||||
.PP
|
||||
\&\fBBIO_get_retry_reason()\fR returns the reason for a special condition if
|
||||
passed the relevant \s-1BIO,\s0 for example as returned by \fBBIO_get_retry_BIO()\fR.
|
||||
passed the relevant BIO, for example as returned by \fBBIO_get_retry_BIO()\fR.
|
||||
.PP
|
||||
\&\fBBIO_set_retry_reason()\fR sets the retry reason for a special condition for a given
|
||||
\&\s-1BIO.\s0 This would usually only be called by \s-1BIO\s0 implementations.
|
||||
.SH "NOTES"
|
||||
BIO. This would usually only be called by BIO implementations.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
\&\fBBIO_should_read()\fR, \fBBIO_should_write()\fR, \fBBIO_should_io_special()\fR,
|
||||
\&\fBBIO_retry_type()\fR, and \fBBIO_should_retry()\fR, are implemented as macros.
|
||||
.PP
|
||||
If \fBBIO_should_retry()\fR returns false then the precise \*(L"error condition\*(R"
|
||||
depends on the \s-1BIO\s0 type that caused it and the return code of the \s-1BIO\s0
|
||||
operation. For example if a call to \fBBIO_read_ex()\fR on a socket \s-1BIO\s0 returns
|
||||
If \fBBIO_should_retry()\fR returns false then the precise "error condition"
|
||||
depends on the BIO type that caused it and the return code of the BIO
|
||||
operation. For example if a call to \fBBIO_read_ex()\fR on a socket BIO returns
|
||||
0 and \fBBIO_should_retry()\fR is false then the cause will be that the
|
||||
connection closed. A similar condition on a file \s-1BIO\s0 will mean that it
|
||||
has reached \s-1EOF.\s0 Some \s-1BIO\s0 types may place additional information on
|
||||
the error queue. For more details see the individual \s-1BIO\s0 type manual
|
||||
connection closed. A similar condition on a file BIO will mean that it
|
||||
has reached EOF. Some BIO types may place additional information on
|
||||
the error queue. For more details see the individual BIO type manual
|
||||
pages.
|
||||
.PP
|
||||
If the underlying I/O structure is in a blocking mode almost all current
|
||||
\&\s-1BIO\s0 types will not request a retry, because the underlying I/O
|
||||
calls will not. If the application knows that the \s-1BIO\s0 type will never
|
||||
BIO types will not request a retry, because the underlying I/O
|
||||
calls will not. If the application knows that the BIO type will never
|
||||
signal a retry then it need not call \fBBIO_should_retry()\fR after a failed
|
||||
\&\s-1BIO I/O\s0 call. This is typically done with file BIOs.
|
||||
BIO I/O call. This is typically done with file BIOs.
|
||||
.PP
|
||||
\&\s-1SSL\s0 BIOs are the only current exception to this rule: they can request a
|
||||
SSL BIOs are the only current exception to this rule: they can request a
|
||||
retry even if the underlying I/O structure is blocking, if a handshake
|
||||
occurs during a call to \fBBIO_read()\fR. An application can retry the failed
|
||||
call immediately or avoid this situation by setting \s-1SSL_MODE_AUTO_RETRY\s0
|
||||
on the underlying \s-1SSL\s0 structure.
|
||||
call immediately or avoid this situation by setting SSL_MODE_AUTO_RETRY
|
||||
on the underlying SSL structure.
|
||||
.PP
|
||||
While an application may retry a failed non blocking call immediately
|
||||
this is likely to be very inefficient because the call will fail
|
||||
|
|
@ -230,47 +155,47 @@ this is done depends on the underlying I/O structure.
|
|||
.PP
|
||||
For example if the cause is ultimately a socket and \fBBIO_should_read()\fR
|
||||
is true then a call to \fBselect()\fR may be made to wait until data is
|
||||
available and then retry the \s-1BIO\s0 operation. By combining the retry
|
||||
available and then retry the BIO operation. By combining the retry
|
||||
conditions of several non blocking BIOs in a single \fBselect()\fR call
|
||||
it is possible to service several BIOs in a single thread, though
|
||||
the performance may be poor if \s-1SSL\s0 BIOs are present because long delays
|
||||
the performance may be poor if SSL BIOs are present because long delays
|
||||
can occur during the initial handshake process.
|
||||
.PP
|
||||
It is possible for a \s-1BIO\s0 to block indefinitely if the underlying I/O
|
||||
It is possible for a BIO to block indefinitely if the underlying I/O
|
||||
structure cannot process or return any data. This depends on the behaviour of
|
||||
the platforms I/O functions. This is often not desirable: one solution
|
||||
is to use non blocking I/O and use a timeout on the \fBselect()\fR (or
|
||||
equivalent) call.
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
The OpenSSL \s-1ASN1\s0 functions cannot gracefully deal with non blocking I/O:
|
||||
The OpenSSL ASN1 functions cannot gracefully deal with non blocking I/O:
|
||||
that is they cannot retry after a partial read or write. This is usually
|
||||
worked around by only passing the relevant data to \s-1ASN1\s0 functions when
|
||||
worked around by only passing the relevant data to ASN1 functions when
|
||||
the entire structure can be read or written.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_should_read()\fR, \fBBIO_should_write()\fR, \fBBIO_should_io_special()\fR, and
|
||||
\&\fBBIO_should_retry()\fR return either 1 or 0 based on the actual conditions
|
||||
of the \fB\s-1BIO\s0\fR.
|
||||
of the \fBBIO\fR.
|
||||
.PP
|
||||
\&\fBBIO_retry_type()\fR returns a flag combination presenting the cause of a retry
|
||||
condition or false if there is no retry condition.
|
||||
.PP
|
||||
\&\fBBIO_get_retry_BIO()\fR returns a valid \fB\s-1BIO\s0\fR structure.
|
||||
\&\fBBIO_get_retry_BIO()\fR returns a valid \fBBIO\fR structure.
|
||||
.PP
|
||||
\&\fBBIO_get_retry_reason()\fR returns the reason for a special condition.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBbio\fR\|(7)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBIO_get_retry_reason()\fR and \fBBIO_set_retry_reason()\fR functions were added in
|
||||
OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_SOCKET_WAIT 3ossl"
|
||||
.TH BIO_SOCKET_WAIT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BIO_SOCKET_WAIT 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BIO_socket_wait,
|
||||
BIO_wait,
|
||||
BIO_do_connect_retry
|
||||
\&\- BIO connection utility functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bio.h>
|
||||
|
|
@ -154,13 +79,13 @@ BIO_do_connect_retry
|
|||
\& int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
|
||||
\& int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_socket_wait()\fR waits on the socket \fBfd\fR for reading if \fBfor_read\fR is not 0,
|
||||
else for writing, at most until \fBmax_time\fR.
|
||||
It succeeds immediately if \fBmax_time\fR == 0 (which means no timeout given).
|
||||
.PP
|
||||
\&\fBBIO_wait()\fR waits at most until \fBmax_time\fR on the given (typically socket-based)
|
||||
\&\fBBIO_wait()\fR waits at most until \fBmax_time\fR on the given (typically socket\-based)
|
||||
\&\fBbio\fR, for reading if \fBbio\fR is supposed to read, else for writing.
|
||||
It is used by \fBBIO_do_connect_retry()\fR and can be used together \fBBIO_read\fR\|(3).
|
||||
It succeeds immediately if \fBmax_time\fR == 0 (which means no timeout given).
|
||||
|
|
@ -171,7 +96,7 @@ Via \fBnap_milliseconds\fR the caller determines the polling granularity.
|
|||
\&\fBBIO_do_connect_retry()\fR connects via the given \fBbio\fR.
|
||||
It retries \fBBIO_do_connect()\fR as far as needed to reach a definite outcome,
|
||||
i.e., connection succeeded, timeout has been reached, or an error occurred.
|
||||
For nonblocking and potentially even non-socket BIOs it polls
|
||||
For nonblocking and potentially even non\-socket BIOs it polls
|
||||
every \fBnap_milliseconds\fR and sleeps in between using \fBBIO_wait()\fR.
|
||||
If \fBnap_milliseconds\fR is < 0 then a default value of 100 ms is used.
|
||||
If the \fBtimeout\fR parameter is > 0 this indicates the maximum number of seconds
|
||||
|
|
@ -186,15 +111,15 @@ return \-1 on error, 0 on timeout, and 1 on success.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBBIO_do_connect\fR\|(3), \fBBIO_read\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBIO_socket_wait()\fR, \fBBIO_wait()\fR, and \fBBIO_do_connect_retry()\fR
|
||||
were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2019\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,82 +53,23 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_BLINDING_NEW 3ossl"
|
||||
.TH BN_BLINDING_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_BLINDING_NEW 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_BLINDING_new, BN_BLINDING_free, BN_BLINDING_update, BN_BLINDING_convert,
|
||||
BN_BLINDING_invert, BN_BLINDING_convert_ex, BN_BLINDING_invert_ex,
|
||||
BN_BLINDING_is_current_thread, BN_BLINDING_set_current_thread,
|
||||
BN_BLINDING_lock, BN_BLINDING_unlock, BN_BLINDING_get_flags,
|
||||
BN_BLINDING_set_flags, BN_BLINDING_create_param \- blinding related BIGNUM functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -175,84 +100,84 @@ BN_BLINDING_set_flags, BN_BLINDING_create_param \- blinding related BIGNUM funct
|
|||
\& BN_MONT_CTX *m_ctx),
|
||||
\& BN_MONT_CTX *m_ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_BLINDING_new()\fR allocates a new \fB\s-1BN_BLINDING\s0\fR structure and copies
|
||||
the \fBA\fR and \fBAi\fR values into the newly created \fB\s-1BN_BLINDING\s0\fR object.
|
||||
\&\fBBN_BLINDING_new()\fR allocates a new \fBBN_BLINDING\fR structure and copies
|
||||
the \fBA\fR and \fBAi\fR values into the newly created \fBBN_BLINDING\fR object.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_free()\fR frees the \fB\s-1BN_BLINDING\s0\fR structure.
|
||||
If \fBb\fR is \s-1NULL,\s0 nothing is done.
|
||||
\&\fBBN_BLINDING_free()\fR frees the \fBBN_BLINDING\fR structure.
|
||||
If \fBb\fR is NULL, nothing is done.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_update()\fR updates the \fB\s-1BN_BLINDING\s0\fR parameters by squaring
|
||||
\&\fBBN_BLINDING_update()\fR updates the \fBBN_BLINDING\fR parameters by squaring
|
||||
the \fBA\fR and \fBAi\fR or, after specific number of uses and if the
|
||||
necessary parameters are set, by re-creating the blinding parameters.
|
||||
necessary parameters are set, by re\-creating the blinding parameters.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_convert_ex()\fR multiplies \fBn\fR with the blinding factor \fBA\fR.
|
||||
If \fBr\fR is not \s-1NULL\s0 a copy the inverse blinding factor \fBAi\fR will be
|
||||
returned in \fBr\fR (this is useful if a \fB\s-1RSA\s0\fR object is shared among
|
||||
If \fBr\fR is not NULL a copy the inverse blinding factor \fBAi\fR will be
|
||||
returned in \fBr\fR (this is useful if a \fBRSA\fR object is shared among
|
||||
several threads). \fBBN_BLINDING_invert_ex()\fR multiplies \fBn\fR with the
|
||||
inverse blinding factor \fBAi\fR. If \fBr\fR is not \s-1NULL\s0 it will be used as
|
||||
inverse blinding factor \fBAi\fR. If \fBr\fR is not NULL it will be used as
|
||||
the inverse blinding.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_convert()\fR and \fBBN_BLINDING_invert()\fR are wrapper
|
||||
functions for \fBBN_BLINDING_convert_ex()\fR and \fBBN_BLINDING_invert_ex()\fR
|
||||
with \fBr\fR set to \s-1NULL.\s0
|
||||
with \fBr\fR set to NULL.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_is_current_thread()\fR returns whether the \fB\s-1BN_BLINDING\s0\fR
|
||||
\&\fBBN_BLINDING_is_current_thread()\fR returns whether the \fBBN_BLINDING\fR
|
||||
structure is owned by the current thread. This is to help users
|
||||
provide proper locking if needed for multi-threaded use.
|
||||
provide proper locking if needed for multi\-threaded use.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_set_current_thread()\fR sets the current thread as the
|
||||
owner of the \fB\s-1BN_BLINDING\s0\fR structure.
|
||||
owner of the \fBBN_BLINDING\fR structure.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_lock()\fR locks the \fB\s-1BN_BLINDING\s0\fR structure.
|
||||
\&\fBBN_BLINDING_lock()\fR locks the \fBBN_BLINDING\fR structure.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_unlock()\fR unlocks the \fB\s-1BN_BLINDING\s0\fR structure.
|
||||
\&\fBBN_BLINDING_unlock()\fR unlocks the \fBBN_BLINDING\fR structure.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_get_flags()\fR returns the \s-1BN_BLINDING\s0 flags. Currently
|
||||
there are two supported flags: \fB\s-1BN_BLINDING_NO_UPDATE\s0\fR and
|
||||
\&\fB\s-1BN_BLINDING_NO_RECREATE\s0\fR. \fB\s-1BN_BLINDING_NO_UPDATE\s0\fR inhibits the
|
||||
automatic update of the \fB\s-1BN_BLINDING\s0\fR parameters after each use
|
||||
and \fB\s-1BN_BLINDING_NO_RECREATE\s0\fR inhibits the automatic re-creation
|
||||
of the \fB\s-1BN_BLINDING\s0\fR parameters after a fixed number of uses (currently
|
||||
32). In newly allocated \fB\s-1BN_BLINDING\s0\fR objects no flags are set.
|
||||
\&\fBBN_BLINDING_set_flags()\fR sets the \fB\s-1BN_BLINDING\s0\fR parameters flags.
|
||||
\&\fBBN_BLINDING_get_flags()\fR returns the BN_BLINDING flags. Currently
|
||||
there are two supported flags: \fBBN_BLINDING_NO_UPDATE\fR and
|
||||
\&\fBBN_BLINDING_NO_RECREATE\fR. \fBBN_BLINDING_NO_UPDATE\fR inhibits the
|
||||
automatic update of the \fBBN_BLINDING\fR parameters after each use
|
||||
and \fBBN_BLINDING_NO_RECREATE\fR inhibits the automatic re\-creation
|
||||
of the \fBBN_BLINDING\fR parameters after a fixed number of uses (currently
|
||||
32). In newly allocated \fBBN_BLINDING\fR objects no flags are set.
|
||||
\&\fBBN_BLINDING_set_flags()\fR sets the \fBBN_BLINDING\fR parameters flags.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_create_param()\fR creates new \fB\s-1BN_BLINDING\s0\fR parameters
|
||||
\&\fBBN_BLINDING_create_param()\fR creates new \fBBN_BLINDING\fR parameters
|
||||
using the exponent \fBe\fR and the modulus \fBm\fR. \fBbn_mod_exp\fR and
|
||||
\&\fBm_ctx\fR can be used to pass special functions for exponentiation
|
||||
(normally \fBBN_mod_exp_mont()\fR and \fB\s-1BN_MONT_CTX\s0\fR).
|
||||
(normally \fBBN_mod_exp_mont()\fR and \fBBN_MONT_CTX\fR).
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_BLINDING_new()\fR returns the newly allocated \fB\s-1BN_BLINDING\s0\fR structure
|
||||
or \s-1NULL\s0 in case of an error.
|
||||
\&\fBBN_BLINDING_new()\fR returns the newly allocated \fBBN_BLINDING\fR structure
|
||||
or NULL in case of an error.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_update()\fR, \fBBN_BLINDING_convert()\fR, \fBBN_BLINDING_invert()\fR,
|
||||
\&\fBBN_BLINDING_convert_ex()\fR and \fBBN_BLINDING_invert_ex()\fR return 1 on
|
||||
success and 0 if an error occurred.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_is_current_thread()\fR returns 1 if the current thread owns
|
||||
the \fB\s-1BN_BLINDING\s0\fR object, 0 otherwise.
|
||||
the \fBBN_BLINDING\fR object, 0 otherwise.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_set_current_thread()\fR doesn't return anything.
|
||||
\&\fBBN_BLINDING_set_current_thread()\fR doesn\*(Aqt return anything.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_lock()\fR, \fBBN_BLINDING_unlock()\fR return 1 if the operation
|
||||
succeeded or 0 on error.
|
||||
.PP
|
||||
\&\fBBN_BLINDING_get_flags()\fR returns the currently set \fB\s-1BN_BLINDING\s0\fR flags
|
||||
\&\fBBN_BLINDING_get_flags()\fR returns the currently set \fBBN_BLINDING\fR flags
|
||||
(a \fBunsigned long\fR value).
|
||||
.PP
|
||||
\&\fBBN_BLINDING_create_param()\fR returns the newly created \fB\s-1BN_BLINDING\s0\fR
|
||||
parameters or \s-1NULL\s0 on error.
|
||||
.SH "HISTORY"
|
||||
\&\fBBN_BLINDING_create_param()\fR returns the newly created \fBBN_BLINDING\fR
|
||||
parameters or NULL on error.
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBN_BLINDING_thread_id()\fR was first introduced in OpenSSL 1.0.0, and it
|
||||
deprecates \fBBN_BLINDING_set_thread_id()\fR and \fBBN_BLINDING_get_thread_id()\fR.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2005\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_CTX_NEW 3ossl"
|
||||
.TH BN_CTX_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_CTX_NEW 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_CTX_new_ex, BN_CTX_new, BN_CTX_secure_new_ex, BN_CTX_secure_new, BN_CTX_free
|
||||
\&\- allocate and free BN_CTX structures
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -154,38 +79,38 @@ BN_CTX_new_ex, BN_CTX_new, BN_CTX_secure_new_ex, BN_CTX_secure_new, BN_CTX_free
|
|||
\&
|
||||
\& void BN_CTX_free(BN_CTX *c);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
A \fB\s-1BN_CTX\s0\fR is a structure that holds \fB\s-1BIGNUM\s0\fR temporary variables used by
|
||||
library functions. Since dynamic memory allocation to create \fB\s-1BIGNUM\s0\fRs
|
||||
A \fBBN_CTX\fR is a structure that holds \fBBIGNUM\fR temporary variables used by
|
||||
library functions. Since dynamic memory allocation to create \fBBIGNUM\fRs
|
||||
is rather expensive when used in conjunction with repeated subroutine
|
||||
calls, the \fB\s-1BN_CTX\s0\fR structure is used.
|
||||
calls, the \fBBN_CTX\fR structure is used.
|
||||
.PP
|
||||
\&\fBBN_CTX_new_ex()\fR allocates and initializes a \fB\s-1BN_CTX\s0\fR structure for the given
|
||||
library context \fBctx\fR. The <ctx> value may be \s-1NULL\s0 in which case the default
|
||||
\&\fBBN_CTX_new_ex()\fR allocates and initializes a \fBBN_CTX\fR structure for the given
|
||||
library context \fBctx\fR. The <ctx> value may be NULL in which case the default
|
||||
library context will be used. \fBBN_CTX_new()\fR is the same as \fBBN_CTX_new_ex()\fR except
|
||||
that the default library context is always used.
|
||||
.PP
|
||||
\&\fBBN_CTX_secure_new_ex()\fR allocates and initializes a \fB\s-1BN_CTX\s0\fR structure
|
||||
\&\fBBN_CTX_secure_new_ex()\fR allocates and initializes a \fBBN_CTX\fR structure
|
||||
but uses the secure heap (see \fBCRYPTO_secure_malloc\fR\|(3)) to hold the
|
||||
\&\fB\s-1BIGNUM\s0\fRs for the given library context \fBctx\fR. The <ctx> value may be \s-1NULL\s0 in
|
||||
\&\fBBIGNUM\fRs for the given library context \fBctx\fR. The <ctx> value may be NULL in
|
||||
which case the default library context will be used. \fBBN_CTX_secure_new()\fR is the
|
||||
same as \fBBN_CTX_secure_new_ex()\fR except that the default library context is always
|
||||
used.
|
||||
.PP
|
||||
\&\fBBN_CTX_free()\fR frees the components of the \fB\s-1BN_CTX\s0\fR and the structure itself.
|
||||
Since \fBBN_CTX_start()\fR is required in order to obtain \fB\s-1BIGNUM\s0\fRs from the
|
||||
\&\fB\s-1BN_CTX\s0\fR, in most cases \fBBN_CTX_end()\fR must be called before the \fB\s-1BN_CTX\s0\fR may
|
||||
be freed by \fBBN_CTX_free()\fR. If \fBc\fR is \s-1NULL,\s0 nothing is done.
|
||||
\&\fBBN_CTX_free()\fR frees the components of the \fBBN_CTX\fR and the structure itself.
|
||||
Since \fBBN_CTX_start()\fR is required in order to obtain \fBBIGNUM\fRs from the
|
||||
\&\fBBN_CTX\fR, in most cases \fBBN_CTX_end()\fR must be called before the \fBBN_CTX\fR may
|
||||
be freed by \fBBN_CTX_free()\fR. If \fBc\fR is NULL, nothing is done.
|
||||
.PP
|
||||
A given \fB\s-1BN_CTX\s0\fR must only be used by a single thread of execution. No
|
||||
A given \fBBN_CTX\fR must only be used by a single thread of execution. No
|
||||
locking is performed, and the internal pool allocator will not properly handle
|
||||
multiple threads of execution.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_CTX_new()\fR and \fBBN_CTX_secure_new()\fR return a pointer to the \fB\s-1BN_CTX\s0\fR.
|
||||
\&\fBBN_CTX_new()\fR and \fBBN_CTX_secure_new()\fR return a pointer to the \fBBN_CTX\fR.
|
||||
If the allocation fails,
|
||||
they return \fB\s-1NULL\s0\fR and sets an error code that can be obtained by
|
||||
they return \fBNULL\fR and sets an error code that can be obtained by
|
||||
\&\fBERR_get_error\fR\|(3).
|
||||
.PP
|
||||
\&\fBBN_CTX_free()\fR has no return values.
|
||||
|
|
@ -210,14 +135,14 @@ replace use of BN_CTX_init with BN_CTX_new instead:
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBBN_add\fR\|(3),
|
||||
\&\fBBN_CTX_start\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBN_CTX_init()\fR was removed in OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_CTX_START 3ossl"
|
||||
.TH BN_CTX_START 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_CTX_START 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_CTX_start, BN_CTX_get, BN_CTX_end \- use temporary BIGNUM variables
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -151,39 +76,39 @@ BN_CTX_start, BN_CTX_get, BN_CTX_end \- use temporary BIGNUM variables
|
|||
\&
|
||||
\& void BN_CTX_end(BN_CTX *ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions are used to obtain temporary \fB\s-1BIGNUM\s0\fR variables from
|
||||
a \fB\s-1BN_CTX\s0\fR (which can been created by using \fBBN_CTX_new\fR\|(3))
|
||||
These functions are used to obtain temporary \fBBIGNUM\fR variables from
|
||||
a \fBBN_CTX\fR (which can been created by using \fBBN_CTX_new\fR\|(3))
|
||||
in order to save the overhead of repeatedly creating and
|
||||
freeing \fB\s-1BIGNUM\s0\fRs in functions that are called from inside a loop.
|
||||
freeing \fBBIGNUM\fRs in functions that are called from inside a loop.
|
||||
.PP
|
||||
A function must call \fBBN_CTX_start()\fR first. Then, \fBBN_CTX_get()\fR may be
|
||||
called repeatedly to obtain temporary \fB\s-1BIGNUM\s0\fRs. All \fBBN_CTX_get()\fR
|
||||
called repeatedly to obtain temporary \fBBIGNUM\fRs. All \fBBN_CTX_get()\fR
|
||||
calls must be made before calling any other functions that use the
|
||||
\&\fBctx\fR as an argument.
|
||||
.PP
|
||||
Finally, \fBBN_CTX_end()\fR must be called before returning from the function.
|
||||
If \fBctx\fR is \s-1NULL,\s0 nothing is done.
|
||||
When \fBBN_CTX_end()\fR is called, the \fB\s-1BIGNUM\s0\fR pointers obtained from
|
||||
If \fBctx\fR is NULL, nothing is done.
|
||||
When \fBBN_CTX_end()\fR is called, the \fBBIGNUM\fR pointers obtained from
|
||||
\&\fBBN_CTX_get()\fR become invalid.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_CTX_start()\fR and \fBBN_CTX_end()\fR return no values.
|
||||
.PP
|
||||
\&\fBBN_CTX_get()\fR returns a pointer to the \fB\s-1BIGNUM\s0\fR, or \fB\s-1NULL\s0\fR on error.
|
||||
Once \fBBN_CTX_get()\fR has failed, the subsequent calls will return \fB\s-1NULL\s0\fR
|
||||
\&\fBBN_CTX_get()\fR returns a pointer to the \fBBIGNUM\fR, or \fBNULL\fR on error.
|
||||
Once \fBBN_CTX_get()\fR has failed, the subsequent calls will return \fBNULL\fR
|
||||
as well, so it is sufficient to check the return value of the last
|
||||
\&\fBBN_CTX_get()\fR call. In case of an error, an error code is set, which
|
||||
can be obtained by \fBERR_get_error\fR\|(3).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBBN_CTX_new\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_ADD 3ossl"
|
||||
.TH BN_ADD 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_ADD 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_add, BN_sub, BN_mul, BN_sqr, BN_div, BN_mod, BN_nnmod, BN_mod_add,
|
||||
BN_mod_sub, BN_mod_mul, BN_mod_sqr, BN_mod_sqrt, BN_exp, BN_mod_exp, BN_gcd \-
|
||||
arithmetic operations on BIGNUMs
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -151,9 +76,9 @@ arithmetic operations on BIGNUMs
|
|||
\&
|
||||
\& int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
\&
|
||||
\& int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
|
||||
\& int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_sqr(BIGNUM *r, BIGNUM *a, BN_CTX *ctx);
|
||||
\& int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *a, const BIGNUM *d,
|
||||
\& BN_CTX *ctx);
|
||||
|
|
@ -162,50 +87,50 @@ arithmetic operations on BIGNUMs
|
|||
\&
|
||||
\& int BN_nnmod(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_mod_add(BIGNUM *r, BIGNUM *a, BIGNUM *b, const BIGNUM *m,
|
||||
\& int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
\& BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_mod_sub(BIGNUM *r, BIGNUM *a, BIGNUM *b, const BIGNUM *m,
|
||||
\& int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
\& BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_mod_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, const BIGNUM *m,
|
||||
\& int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
\& BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_mod_sqr(BIGNUM *r, BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
\& int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
\&
|
||||
\& BIGNUM *BN_mod_sqrt(BIGNUM *in, BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
\& BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BN_CTX *ctx);
|
||||
\& int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
\& int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
\& const BIGNUM *m, BN_CTX *ctx);
|
||||
\&
|
||||
\& int BN_gcd(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
|
||||
\& int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_add()\fR adds \fIa\fR and \fIb\fR and places the result in \fIr\fR (\f(CW\*(C`r=a+b\*(C'\fR).
|
||||
\&\fIr\fR may be the same \fB\s-1BIGNUM\s0\fR as \fIa\fR or \fIb\fR.
|
||||
\&\fIr\fR may be the same \fBBIGNUM\fR as \fIa\fR or \fIb\fR.
|
||||
.PP
|
||||
\&\fBBN_sub()\fR subtracts \fIb\fR from \fIa\fR and places the result in \fIr\fR (\f(CW\*(C`r=a\-b\*(C'\fR).
|
||||
\&\fIr\fR may be the same \fB\s-1BIGNUM\s0\fR as \fIa\fR or \fIb\fR.
|
||||
\&\fIr\fR may be the same \fBBIGNUM\fR as \fIa\fR or \fIb\fR.
|
||||
.PP
|
||||
\&\fBBN_mul()\fR multiplies \fIa\fR and \fIb\fR and places the result in \fIr\fR (\f(CW\*(C`r=a*b\*(C'\fR).
|
||||
\&\fIr\fR may be the same \fB\s-1BIGNUM\s0\fR as \fIa\fR or \fIb\fR.
|
||||
\&\fIr\fR may be the same \fBBIGNUM\fR as \fIa\fR or \fIb\fR.
|
||||
For multiplication by powers of 2, use \fBBN_lshift\fR\|(3).
|
||||
.PP
|
||||
\&\fBBN_sqr()\fR takes the square of \fIa\fR and places the result in \fIr\fR
|
||||
(\f(CW\*(C`r=a^2\*(C'\fR). \fIr\fR and \fIa\fR may be the same \fB\s-1BIGNUM\s0\fR.
|
||||
(\f(CW\*(C`r=a^2\*(C'\fR). \fIr\fR and \fIa\fR may be the same \fBBIGNUM\fR.
|
||||
This function is faster than BN_mul(r,a,a).
|
||||
.PP
|
||||
\&\fBBN_div()\fR divides \fIa\fR by \fId\fR and places the result in \fIdv\fR and the
|
||||
remainder in \fIrem\fR (\f(CW\*(C`dv=a/d, rem=a%d\*(C'\fR). Either of \fIdv\fR and \fIrem\fR may
|
||||
be \fB\s-1NULL\s0\fR, in which case the respective value is not returned.
|
||||
be \fBNULL\fR, in which case the respective value is not returned.
|
||||
The result is rounded towards zero; thus if \fIa\fR is negative, the
|
||||
remainder will be zero or negative.
|
||||
For division by powers of 2, use \fBBN_rshift\fR\|(3).
|
||||
.PP
|
||||
\&\fBBN_mod()\fR corresponds to \fBBN_div()\fR with \fIdv\fR set to \fB\s-1NULL\s0\fR.
|
||||
\&\fBBN_mod()\fR corresponds to \fBBN_div()\fR with \fIdv\fR set to \fBNULL\fR.
|
||||
.PP
|
||||
\&\fBBN_nnmod()\fR reduces \fIa\fR modulo \fIm\fR and places the nonnegative
|
||||
remainder in \fIr\fR.
|
||||
|
|
@ -218,7 +143,7 @@ nonnegative result in \fIr\fR.
|
|||
.PP
|
||||
\&\fBBN_mod_mul()\fR multiplies \fIa\fR by \fIb\fR and finds the nonnegative
|
||||
remainder respective to modulus \fIm\fR (\f(CW\*(C`r=(a*b) mod m\*(C'\fR). \fIr\fR may be
|
||||
the same \fB\s-1BIGNUM\s0\fR as \fIa\fR or \fIb\fR. For more efficient algorithms for
|
||||
the same \fBBIGNUM\fR as \fIa\fR or \fIb\fR. For more efficient algorithms for
|
||||
repeated computations using the same modulus, see
|
||||
\&\fBBN_mod_mul_montgomery\fR\|(3) and
|
||||
\&\fBBN_mod_mul_reciprocal\fR\|(3).
|
||||
|
|
@ -228,8 +153,8 @@ result in \fIr\fR.
|
|||
.PP
|
||||
\&\fBBN_mod_sqrt()\fR returns the modular square root of \fIa\fR such that
|
||||
\&\f(CW\*(C`in^2 = a (mod p)\*(C'\fR. The modulus \fIp\fR must be a
|
||||
prime, otherwise an error or an incorrect \*(L"result\*(R" will be returned.
|
||||
The result is stored into \fIin\fR which can be \s-1NULL.\s0 The result will be
|
||||
prime, otherwise an error or an incorrect "result" will be returned.
|
||||
The result is stored into \fIin\fR which can be NULL. The result will be
|
||||
newly allocated in that case.
|
||||
.PP
|
||||
\&\fBBN_exp()\fR raises \fIa\fR to the \fIp\fR\-th power and places the result in \fIr\fR
|
||||
|
|
@ -239,21 +164,25 @@ newly allocated in that case.
|
|||
\&\fBBN_mod_exp()\fR computes \fIa\fR to the \fIp\fR\-th power modulo \fIm\fR (\f(CW\*(C`r=a^p %
|
||||
m\*(C'\fR). This function uses less time and space than \fBBN_exp()\fR. Do not call this
|
||||
function when \fBm\fR is even and any of the parameters have the
|
||||
\&\fB\s-1BN_FLG_CONSTTIME\s0\fR flag set.
|
||||
\&\fBBN_FLG_CONSTTIME\fR flag set.
|
||||
.PP
|
||||
\&\fBBN_gcd()\fR computes the greatest common divisor of \fIa\fR and \fIb\fR and
|
||||
places the result in \fIr\fR. \fIr\fR may be the same \fB\s-1BIGNUM\s0\fR as \fIa\fR or
|
||||
places the result in \fIr\fR. \fIr\fR may be the same \fBBIGNUM\fR as \fIa\fR or
|
||||
\&\fIb\fR.
|
||||
.PP
|
||||
For all functions, \fIctx\fR is a previously allocated \fB\s-1BN_CTX\s0\fR used for
|
||||
For all functions, \fIctx\fR is a previously allocated \fBBN_CTX\fR used for
|
||||
temporary variables; see \fBBN_CTX_new\fR\|(3).
|
||||
.PP
|
||||
Unless noted otherwise, the result \fB\s-1BIGNUM\s0\fR must be different from
|
||||
Unless noted otherwise, the result \fBBIGNUM\fR must be different from
|
||||
the arguments.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
For modular operations such as \fBBN_nnmod()\fR or \fBBN_mod_exp()\fR it is an error
|
||||
to use the same \fBBIGNUM\fR object for the modulus as for the output.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
The \fBBN_mod_sqrt()\fR returns the result (possibly incorrect if \fIp\fR is
|
||||
not a prime), or \s-1NULL.\s0
|
||||
not a prime), or NULL.
|
||||
.PP
|
||||
For all remaining functions, 1 is returned for success, 0 on error. The return
|
||||
value should always be checked (e.g., \f(CW\*(C`if (!BN_add(r,a,b)) goto err;\*(C'\fR).
|
||||
|
|
@ -262,11 +191,11 @@ The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBBN_CTX_new\fR\|(3),
|
||||
\&\fBBN_add_word\fR\|(3), \fBBN_set_bit\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2000\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_ADD_WORD 3ossl"
|
||||
.TH BN_ADD_WORD 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_ADD_WORD 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_add_word, BN_sub_word, BN_mul_word, BN_div_word, BN_mod_word \- arithmetic
|
||||
functions on BIGNUMs with integers
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -156,10 +81,10 @@ functions on BIGNUMs with integers
|
|||
\&
|
||||
\& BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions perform arithmetic operations on BIGNUMs with unsigned
|
||||
integers. They are much more efficient than the normal \s-1BIGNUM\s0
|
||||
integers. They are much more efficient than the normal BIGNUM
|
||||
arithmetic operations.
|
||||
.PP
|
||||
\&\fBBN_add_word()\fR adds \fBw\fR to \fBa\fR (\f(CW\*(C`a+=w\*(C'\fR).
|
||||
|
|
@ -179,15 +104,15 @@ For \fBBN_div_word()\fR and \fBBN_mod_word()\fR, \fBw\fR must not be 0.
|
|||
on error. The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
||||
.PP
|
||||
\&\fBBN_mod_word()\fR and \fBBN_div_word()\fR return \fBa\fR%\fBw\fR on success and
|
||||
\&\fB(\s-1BN_ULONG\s0)\-1\fR if an error occurred.
|
||||
\&\fB(BN_ULONG)\-1\fR if an error occurred.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBBN_add\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_BN2BIN 3ossl"
|
||||
.TH BN_BN2BIN 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_BN2BIN 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_bn2binpad,
|
||||
BN_bn2bin, BN_bin2bn, BN_bn2lebinpad, BN_lebin2bn,
|
||||
BN_bn2nativepad, BN_native2bn, BN_bn2hex, BN_bn2dec, BN_hex2bn, BN_dec2bn,
|
||||
BN_print, BN_print_fp, BN_bn2mpi, BN_mpi2bn \- format conversions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -169,76 +94,76 @@ BN_print, BN_print_fp, BN_bn2mpi, BN_mpi2bn \- format conversions
|
|||
\& int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
|
||||
\& BIGNUM *BN_mpi2bn(unsigned char *s, int len, BIGNUM *ret);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_bn2bin()\fR converts the absolute value of \fBa\fR into big-endian form
|
||||
\&\fBBN_bn2bin()\fR converts the absolute value of \fBa\fR into big\-endian form
|
||||
and stores it at \fBto\fR. \fBto\fR must point to BN_num_bytes(\fBa\fR) bytes of
|
||||
memory.
|
||||
.PP
|
||||
\&\fBBN_bn2binpad()\fR also converts the absolute value of \fBa\fR into big-endian form
|
||||
\&\fBBN_bn2binpad()\fR also converts the absolute value of \fBa\fR into big\-endian form
|
||||
and stores it at \fBto\fR. \fBtolen\fR indicates the length of the output buffer
|
||||
\&\fBto\fR. The result is padded with zeros if necessary. If \fBtolen\fR is less than
|
||||
BN_num_bytes(\fBa\fR) an error is returned.
|
||||
.PP
|
||||
\&\fBBN_bin2bn()\fR converts the positive integer in big-endian form of length
|
||||
\&\fBlen\fR at \fBs\fR into a \fB\s-1BIGNUM\s0\fR and places it in \fBret\fR. If \fBret\fR is
|
||||
\&\s-1NULL,\s0 a new \fB\s-1BIGNUM\s0\fR is created.
|
||||
\&\fBBN_bin2bn()\fR converts the positive integer in big\-endian form of length
|
||||
\&\fBlen\fR at \fBs\fR into a \fBBIGNUM\fR and places it in \fBret\fR. If \fBret\fR is
|
||||
NULL, a new \fBBIGNUM\fR is created.
|
||||
.PP
|
||||
\&\fBBN_bn2lebinpad()\fR and \fBBN_lebin2bn()\fR are identical to \fBBN_bn2binpad()\fR and
|
||||
\&\fBBN_bin2bn()\fR except the buffer is in little-endian format.
|
||||
\&\fBBN_bin2bn()\fR except the buffer is in little\-endian format.
|
||||
.PP
|
||||
\&\fBBN_bn2nativepad()\fR and \fBBN_native2bn()\fR are identical to \fBBN_bn2binpad()\fR and
|
||||
\&\fBBN_bin2bn()\fR except the buffer is in native format, i.e. most significant
|
||||
byte first on big-endian platforms, and least significant byte first on
|
||||
little-endian platforms.
|
||||
byte first on big\-endian platforms, and least significant byte first on
|
||||
little\-endian platforms.
|
||||
.PP
|
||||
\&\fBBN_bn2hex()\fR and \fBBN_bn2dec()\fR return printable strings containing the
|
||||
hexadecimal and decimal encoding of \fBa\fR respectively. For negative
|
||||
numbers, the string is prefaced with a leading '\-'. The string must be
|
||||
numbers, the string is prefaced with a leading \*(Aq\-\*(Aq. The string must be
|
||||
freed later using \fBOPENSSL_free()\fR.
|
||||
.PP
|
||||
\&\fBBN_hex2bn()\fR takes as many characters as possible from the string \fBstr\fR,
|
||||
including the leading character '\-' which means negative, to form a valid
|
||||
hexadecimal number representation and converts them to a \fB\s-1BIGNUM\s0\fR and
|
||||
stores it in **\fBa\fR. If *\fBa\fR is \s-1NULL,\s0 a new \fB\s-1BIGNUM\s0\fR is created. If
|
||||
\&\fBa\fR is \s-1NULL,\s0 it only computes the length of valid representation.
|
||||
A \*(L"negative zero\*(R" is converted to zero.
|
||||
including the leading character \*(Aq\-\*(Aq which means negative, to form a valid
|
||||
hexadecimal number representation and converts them to a \fBBIGNUM\fR and
|
||||
stores it in **\fBa\fR. If *\fBa\fR is NULL, a new \fBBIGNUM\fR is created. If
|
||||
\&\fBa\fR is NULL, it only computes the length of valid representation.
|
||||
A "negative zero" is converted to zero.
|
||||
\&\fBBN_dec2bn()\fR is the same using the decimal system.
|
||||
.PP
|
||||
\&\fBBN_print()\fR and \fBBN_print_fp()\fR write the hexadecimal encoding of \fBa\fR,
|
||||
with a leading '\-' for negative numbers, to the \fB\s-1BIO\s0\fR or \fB\s-1FILE\s0\fR
|
||||
with a leading \*(Aq\-\*(Aq for negative numbers, to the \fBBIO\fR or \fBFILE\fR
|
||||
\&\fBfp\fR.
|
||||
.PP
|
||||
\&\fBBN_bn2mpi()\fR and \fBBN_mpi2bn()\fR convert \fB\s-1BIGNUM\s0\fRs from and to a format
|
||||
that consists of the number's length in bytes represented as a 4\-byte
|
||||
big-endian number, and the number itself in big-endian format, where
|
||||
\&\fBBN_bn2mpi()\fR and \fBBN_mpi2bn()\fR convert \fBBIGNUM\fRs from and to a format
|
||||
that consists of the number\*(Aqs length in bytes represented as a 4\-byte
|
||||
big\-endian number, and the number itself in big\-endian format, where
|
||||
the most significant bit signals a negative number (the representation
|
||||
of numbers with the \s-1MSB\s0 set is prefixed with null byte).
|
||||
of numbers with the MSB set is prefixed with null byte).
|
||||
.PP
|
||||
\&\fBBN_bn2mpi()\fR stores the representation of \fBa\fR at \fBto\fR, where \fBto\fR
|
||||
must be large enough to hold the result. The size can be determined by
|
||||
calling BN_bn2mpi(\fBa\fR, \s-1NULL\s0).
|
||||
calling BN_bn2mpi(\fBa\fR, NULL).
|
||||
.PP
|
||||
\&\fBBN_mpi2bn()\fR converts the \fBlen\fR bytes long representation at \fBs\fR to
|
||||
a \fB\s-1BIGNUM\s0\fR and stores it at \fBret\fR, or in a newly allocated \fB\s-1BIGNUM\s0\fR
|
||||
if \fBret\fR is \s-1NULL.\s0
|
||||
a \fBBIGNUM\fR and stores it at \fBret\fR, or in a newly allocated \fBBIGNUM\fR
|
||||
if \fBret\fR is NULL.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_bn2bin()\fR returns the length of the big-endian number placed at \fBto\fR.
|
||||
\&\fBBN_bin2bn()\fR returns the \fB\s-1BIGNUM\s0\fR, \s-1NULL\s0 on error.
|
||||
\&\fBBN_bn2bin()\fR returns the length of the big\-endian number placed at \fBto\fR.
|
||||
\&\fBBN_bin2bn()\fR returns the \fBBIGNUM\fR, NULL on error.
|
||||
.PP
|
||||
\&\fBBN_bn2binpad()\fR, \fBBN_bn2lebinpad()\fR, and \fBBN_bn2nativepad()\fR return the number of bytes written or \-1 if the supplied
|
||||
buffer is too small.
|
||||
.PP
|
||||
\&\fBBN_bn2hex()\fR and \fBBN_bn2dec()\fR return a NUL-terminated string, or \s-1NULL\s0
|
||||
\&\fBBN_bn2hex()\fR and \fBBN_bn2dec()\fR return a NUL\-terminated string, or NULL
|
||||
on error. \fBBN_hex2bn()\fR and \fBBN_dec2bn()\fR return the number of characters
|
||||
used in parsing, or 0 on error, in which
|
||||
case no new \fB\s-1BIGNUM\s0\fR will be created.
|
||||
case no new \fBBIGNUM\fR will be created.
|
||||
.PP
|
||||
\&\fBBN_print_fp()\fR and \fBBN_print()\fR return 1 on success, 0 on write errors.
|
||||
.PP
|
||||
\&\fBBN_bn2mpi()\fR returns the length of the representation. \fBBN_mpi2bn()\fR
|
||||
returns the \fB\s-1BIGNUM\s0\fR, and \s-1NULL\s0 on error.
|
||||
returns the \fBBIGNUM\fR, and NULL on error.
|
||||
.PP
|
||||
The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
||||
.SH "SEE ALSO"
|
||||
|
|
@ -246,11 +171,11 @@ The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
|||
\&\fBERR_get_error\fR\|(3), \fBBN_zero\fR\|(3),
|
||||
\&\fBASN1_INTEGER_to_BN\fR\|(3),
|
||||
\&\fBBN_num_bytes\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_CMP 3ossl"
|
||||
.TH BN_CMP 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_CMP 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_abs_is_word, BN_is_odd \- BIGNUM comparison and test functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -154,7 +79,7 @@ BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_abs_is_word, BN_is_odd \-
|
|||
\& int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
|
||||
\& int BN_is_odd(const BIGNUM *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_cmp()\fR compares the numbers \fIa\fR and \fIb\fR. \fBBN_ucmp()\fR compares their
|
||||
absolute values.
|
||||
|
|
@ -170,15 +95,15 @@ of \fIa\fR and \fIb\fR.
|
|||
.PP
|
||||
\&\fBBN_is_zero()\fR, \fBBN_is_one()\fR \fBBN_is_word()\fR, \fBBN_abs_is_word()\fR and
|
||||
\&\fBBN_is_odd()\fR return 1 if the condition is true, 0 otherwise.
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
Prior to OpenSSL 1.1.0, \fBBN_is_zero()\fR, \fBBN_is_one()\fR, \fBBN_is_word()\fR,
|
||||
\&\fBBN_abs_is_word()\fR and \fBBN_is_odd()\fR were macros.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_COPY 3ossl"
|
||||
.TH BN_COPY 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_COPY 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_copy, BN_dup, BN_with_flags \- copy BIGNUMs
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -151,9 +76,9 @@ BN_copy, BN_dup, BN_with_flags \- copy BIGNUMs
|
|||
\&
|
||||
\& void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_copy()\fR copies \fBfrom\fR to \fBto\fR. \fBBN_dup()\fR creates a new \fB\s-1BIGNUM\s0\fR
|
||||
\&\fBBN_copy()\fR copies \fBfrom\fR to \fBto\fR. \fBBN_dup()\fR creates a new \fBBIGNUM\fR
|
||||
containing the value \fBfrom\fR.
|
||||
.PP
|
||||
BN_with_flags creates a \fBtemporary\fR shallow copy of \fBb\fR in \fBdest\fR. It places
|
||||
|
|
@ -161,31 +86,31 @@ significant restrictions on the copied data. Applications that do no adhere to
|
|||
these restrictions may encounter unexpected side effects or crashes. For that
|
||||
reason use of this function is discouraged. Any flags provided in \fBflags\fR will
|
||||
be set in \fBdest\fR in addition to any flags already set in \fBb\fR. For example this
|
||||
might commonly be used to create a temporary copy of a \s-1BIGNUM\s0 with the
|
||||
\&\fB\s-1BN_FLG_CONSTTIME\s0\fR flag set for constant time operations. The temporary copy in
|
||||
might commonly be used to create a temporary copy of a BIGNUM with the
|
||||
\&\fBBN_FLG_CONSTTIME\fR flag set for constant time operations. The temporary copy in
|
||||
\&\fBdest\fR will share some internal state with \fBb\fR. For this reason the following
|
||||
restrictions apply to the use of \fBdest\fR:
|
||||
.IP "\(bu" 2
|
||||
\&\fBdest\fR should be a newly allocated \s-1BIGNUM\s0 obtained via a call to \fBBN_new()\fR. It
|
||||
.IP \(bu 2
|
||||
\&\fBdest\fR should be a newly allocated BIGNUM obtained via a call to \fBBN_new()\fR. It
|
||||
should not have been used for other purposes or initialised in any way.
|
||||
.IP "\(bu" 2
|
||||
\&\fBdest\fR must only be used in \*(L"read-only\*(R" operations, i.e. typically those
|
||||
functions where the relevant parameter is declared \*(L"const\*(R".
|
||||
.IP "\(bu" 2
|
||||
.IP \(bu 2
|
||||
\&\fBdest\fR must only be used in "read\-only" operations, i.e. typically those
|
||||
functions where the relevant parameter is declared "const".
|
||||
.IP \(bu 2
|
||||
\&\fBdest\fR must be used and freed before any further subsequent use of \fBb\fR
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_copy()\fR returns \fBto\fR on success, \s-1NULL\s0 on error. \fBBN_dup()\fR returns
|
||||
the new \fB\s-1BIGNUM\s0\fR, and \s-1NULL\s0 on error. The error codes can be obtained
|
||||
\&\fBBN_copy()\fR returns \fBto\fR on success, NULL on error. \fBBN_dup()\fR returns
|
||||
the new \fBBIGNUM\fR, and NULL on error. The error codes can be obtained
|
||||
by \fBERR_get_error\fR\|(3).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_GENERATE_PRIME 3ossl"
|
||||
.TH BN_GENERATE_PRIME 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_GENERATE_PRIME 3ossl 2026-02-03 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_generate_prime_ex2, BN_generate_prime_ex, BN_is_prime_ex, BN_check_prime,
|
||||
BN_is_prime_fasttest_ex, BN_GENCB_call, BN_GENCB_new, BN_GENCB_free,
|
||||
BN_GENCB_set_old, BN_GENCB_set, BN_GENCB_get_arg, BN_generate_prime,
|
||||
BN_is_prime, BN_is_prime_fasttest \- generate primes and test for primality
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -173,7 +98,7 @@ BN_is_prime, BN_is_prime_fasttest \- generate primes and test for primality
|
|||
.Ve
|
||||
.PP
|
||||
The following functions have been deprecated since OpenSSL 0.9.8, and can be
|
||||
hidden entirely by defining \fB\s-1OPENSSL_API_COMPAT\s0\fR with a suitable version value,
|
||||
hidden entirely by defining \fBOPENSSL_API_COMPAT\fR with a suitable version value,
|
||||
see \fBopenssl_user_macros\fR\|(7):
|
||||
.PP
|
||||
.Vb 3
|
||||
|
|
@ -190,7 +115,7 @@ see \fBopenssl_user_macros\fR\|(7):
|
|||
.Ve
|
||||
.PP
|
||||
The following functions have been deprecated since OpenSSL 3.0, and can be
|
||||
hidden entirely by defining \fB\s-1OPENSSL_API_COMPAT\s0\fR with a suitable version value,
|
||||
hidden entirely by defining \fBOPENSSL_API_COMPAT\fR with a suitable version value,
|
||||
see \fBopenssl_user_macros\fR\|(7):
|
||||
.PP
|
||||
.Vb 1
|
||||
|
|
@ -199,57 +124,57 @@ see \fBopenssl_user_macros\fR\|(7):
|
|||
\& int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
||||
\& int do_trial_division, BN_GENCB *cb);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_generate_prime_ex2()\fR generates a pseudo-random prime number of
|
||||
at least bit length \fBbits\fR using the \s-1BN_CTX\s0 provided in \fBctx\fR. The value of
|
||||
\&\fBctx\fR must not be \s-1NULL.\s0
|
||||
\&\fBBN_generate_prime_ex2()\fR generates a pseudo\-random prime number of
|
||||
at least bit length \fBbits\fR using the BN_CTX provided in \fBctx\fR. The value of
|
||||
\&\fBctx\fR must not be NULL.
|
||||
.PP
|
||||
The returned number is probably prime with a negligible error.
|
||||
The maximum error rate is 2^\-128.
|
||||
It's 2^\-287 for a 512 bit prime, 2^\-435 for a 1024 bit prime,
|
||||
It\*(Aqs 2^\-287 for a 512 bit prime, 2^\-435 for a 1024 bit prime,
|
||||
2^\-648 for a 2048 bit prime, and lower than 2^\-882 for primes larger
|
||||
than 2048 bit.
|
||||
.PP
|
||||
If \fBadd\fR is \fB\s-1NULL\s0\fR the returned prime number will have exact bit
|
||||
If \fBadd\fR is \fBNULL\fR the returned prime number will have exact bit
|
||||
length \fBbits\fR with the top most two bits set.
|
||||
.PP
|
||||
If \fBret\fR is not \fB\s-1NULL\s0\fR, it will be used to store the number.
|
||||
If \fBret\fR is not \fBNULL\fR, it will be used to store the number.
|
||||
.PP
|
||||
If \fBcb\fR is not \fB\s-1NULL\s0\fR, it is used as follows:
|
||||
.IP "\(bu" 2
|
||||
If \fBcb\fR is not \fBNULL\fR, it is used as follows:
|
||||
.IP \(bu 2
|
||||
\&\fBBN_GENCB_call(cb, 0, i)\fR is called after generating the i\-th
|
||||
potential prime number.
|
||||
.IP "\(bu" 2
|
||||
.IP \(bu 2
|
||||
While the number is being tested for primality,
|
||||
\&\fBBN_GENCB_call(cb, 1, j)\fR is called as described below.
|
||||
.IP "\(bu" 2
|
||||
.IP \(bu 2
|
||||
When a prime has been found, \fBBN_GENCB_call(cb, 2, i)\fR is called.
|
||||
.IP "\(bu" 2
|
||||
.IP \(bu 2
|
||||
The callers of \fBBN_generate_prime_ex()\fR may call \fBBN_GENCB_call(cb, i, j)\fR with
|
||||
other values as described in their respective man pages; see \*(L"\s-1SEE ALSO\*(R"\s0.
|
||||
other values as described in their respective man pages; see "SEE ALSO".
|
||||
.PP
|
||||
The prime may have to fulfill additional requirements for use in
|
||||
Diffie-Hellman key exchange:
|
||||
Diffie\-Hellman key exchange:
|
||||
.PP
|
||||
If \fBadd\fR is not \fB\s-1NULL\s0\fR, the prime will fulfill the condition p % \fBadd\fR
|
||||
== \fBrem\fR (p % \fBadd\fR == 1 if \fBrem\fR == \fB\s-1NULL\s0\fR) in order to suit a given
|
||||
If \fBadd\fR is not \fBNULL\fR, the prime will fulfill the condition p % \fBadd\fR
|
||||
== \fBrem\fR (p % \fBadd\fR == 1 if \fBrem\fR == \fBNULL\fR) in order to suit a given
|
||||
generator.
|
||||
.PP
|
||||
If \fBsafe\fR is true, it will be a safe prime (i.e. a prime p so
|
||||
that (p\-1)/2 is also prime). If \fBsafe\fR is true, and \fBrem\fR == \fB\s-1NULL\s0\fR
|
||||
that (p\-1)/2 is also prime). If \fBsafe\fR is true, and \fBrem\fR == \fBNULL\fR
|
||||
the condition will be p % \fBadd\fR == 3.
|
||||
It is recommended that \fBadd\fR is a multiple of 4.
|
||||
.PP
|
||||
The random generator must be seeded prior to calling \fBBN_generate_prime_ex()\fR.
|
||||
If the automatic seeding or reseeding of the OpenSSL \s-1CSPRNG\s0 fails due to
|
||||
external circumstances (see \s-1\fBRAND\s0\fR\|(7)), the operation will fail.
|
||||
The random number generator configured for the \s-1OSSL_LIB_CTX\s0 associated with
|
||||
If the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to
|
||||
external circumstances (see \fBRAND\fR\|(7)), the operation will fail.
|
||||
The random number generator configured for the OSSL_LIB_CTX associated with
|
||||
\&\fBctx\fR will be used.
|
||||
.PP
|
||||
\&\fBBN_generate_prime_ex()\fR is the same as \fBBN_generate_prime_ex2()\fR except that no
|
||||
\&\fBctx\fR parameter is passed.
|
||||
In this case the random number generator associated with the default \s-1OSSL_LIB_CTX\s0
|
||||
In this case the random number generator associated with the default OSSL_LIB_CTX
|
||||
will be used.
|
||||
.PP
|
||||
\&\fBBN_check_prime()\fR, \fBBN_is_prime_ex()\fR, \fBBN_is_prime_fasttest_ex()\fR, \fBBN_is_prime()\fR
|
||||
|
|
@ -259,15 +184,15 @@ or all the tests passed.
|
|||
If \fBp\fR passes all these tests, it is considered a probable prime.
|
||||
.PP
|
||||
The test performed on \fBp\fR are trial division by a number of small primes
|
||||
and rounds of the of the Miller-Rabin probabilistic primality test.
|
||||
and rounds of the of the Miller\-Rabin probabilistic primality test.
|
||||
.PP
|
||||
The functions do at least 64 rounds of the Miller-Rabin test giving a maximum
|
||||
The functions do at least 64 rounds of the Miller\-Rabin test giving a maximum
|
||||
false positive rate of 2^\-128.
|
||||
If the size of \fBp\fR is more than 2048 bits, they do at least 128 rounds
|
||||
giving a maximum false positive rate of 2^\-256.
|
||||
.PP
|
||||
If \fBnchecks\fR is larger than the minimum above (64 or 128), \fBnchecks\fR
|
||||
rounds of the Miller-Rabin test will be done.
|
||||
rounds of the Miller\-Rabin test will be done.
|
||||
.PP
|
||||
If \fBdo_trial_division\fR set to \fB0\fR, the trial division will be skipped.
|
||||
\&\fBBN_is_prime_ex()\fR and \fBBN_is_prime()\fR always skip the trial division.
|
||||
|
|
@ -279,29 +204,30 @@ and \fBBN_is_prime_fasttest()\fR are deprecated.
|
|||
\&\fBBN_is_prime_fasttest_ex()\fR and \fBBN_is_prime_ex()\fR respectively, but with the old
|
||||
style call back.
|
||||
.PP
|
||||
\&\fBctx\fR is a preallocated \fB\s-1BN_CTX\s0\fR (to save the overhead of allocating and
|
||||
freeing the structure in a loop), or \fB\s-1NULL\s0\fR.
|
||||
\&\fBctx\fR is a preallocated \fBBN_CTX\fR (to save the overhead of allocating and
|
||||
freeing the structure in a loop), or \fBNULL\fR.
|
||||
.PP
|
||||
If the trial division is done, and no divisors are found and \fBcb\fR
|
||||
is not \fB\s-1NULL\s0\fR, \fBBN_GENCB_call(cb, 1, \-1)\fR is called.
|
||||
is not \fBNULL\fR, \fBBN_GENCB_call(cb, 1, \-1)\fR is called.
|
||||
.PP
|
||||
After each round of the Miller-Rabin probabilistic primality test,
|
||||
if \fBcb\fR is not \fB\s-1NULL\s0\fR, \fBBN_GENCB_call(cb, 1, j)\fR is called
|
||||
After each round of the Miller\-Rabin probabilistic primality test,
|
||||
if \fBcb\fR is not \fBNULL\fR, \fBBN_GENCB_call(cb, 1, j)\fR is called
|
||||
with \fBj\fR the iteration (j = 0, 1, ...).
|
||||
.PP
|
||||
\&\fBBN_GENCB_call()\fR calls the callback function held in the \fB\s-1BN_GENCB\s0\fR structure
|
||||
\&\fBBN_GENCB_call()\fR calls the callback function held in the \fBBN_GENCB\fR structure
|
||||
and passes the ints \fBa\fR and \fBb\fR as arguments. There are two types of
|
||||
\&\fB\s-1BN_GENCB\s0\fR structure that are supported: \*(L"new\*(R" style and \*(L"old\*(R" style. New
|
||||
programs should prefer the \*(L"new\*(R" style, whilst the \*(L"old\*(R" style is provided
|
||||
\&\fBBN_GENCB\fR structure that are supported: "new" style and "old" style. New
|
||||
programs should prefer the "new" style, whilst the "old" style is provided
|
||||
for backwards compatibility purposes.
|
||||
.PP
|
||||
A \fB\s-1BN_GENCB\s0\fR structure should be created through a call to \fBBN_GENCB_new()\fR,
|
||||
and freed through a call to \fBBN_GENCB_free()\fR.
|
||||
A \fBBN_GENCB\fR structure should be created through a call to \fBBN_GENCB_new()\fR,
|
||||
and freed through a call to \fBBN_GENCB_free()\fR. If the argument is NULL,
|
||||
nothing is done.
|
||||
.PP
|
||||
For \*(L"new\*(R" style callbacks a \s-1BN_GENCB\s0 structure should be initialised with a
|
||||
call to \fBBN_GENCB_set()\fR, where \fBgencb\fR is a \fB\s-1BN_GENCB\s0 *\fR, \fBcallback\fR is of
|
||||
type \fBint (*callback)(int, int, \s-1BN_GENCB\s0 *)\fR and \fBcb_arg\fR is a \fBvoid *\fR.
|
||||
\&\*(L"Old\*(R" style callbacks are the same except they are initialised with a call
|
||||
For "new" style callbacks a BN_GENCB structure should be initialised with a
|
||||
call to \fBBN_GENCB_set()\fR, where \fBgencb\fR is a \fBBN_GENCB *\fR, \fBcallback\fR is of
|
||||
type \fBint (*callback)(int, int, BN_GENCB *)\fR and \fBcb_arg\fR is a \fBvoid *\fR.
|
||||
"Old" style callbacks are the same except they are initialised with a call
|
||||
to \fBBN_GENCB_set_old()\fR and \fBcallback\fR is of type
|
||||
\&\fBvoid (*callback)(int, int, void *)\fR.
|
||||
.PP
|
||||
|
|
@ -309,11 +235,11 @@ A callback is invoked through a call to \fBBN_GENCB_call\fR. This will check
|
|||
the type of the callback and will invoke \fBcallback(a, b, gencb)\fR for new
|
||||
style callbacks or \fBcallback(a, b, cb_arg)\fR for old style.
|
||||
.PP
|
||||
It is possible to obtain the argument associated with a \s-1BN_GENCB\s0 structure
|
||||
It is possible to obtain the argument associated with a BN_GENCB structure
|
||||
(set via a call to BN_GENCB_set or BN_GENCB_set_old) using BN_GENCB_get_arg.
|
||||
.PP
|
||||
\&\fBBN_generate_prime()\fR (deprecated) works in the same way as
|
||||
\&\fBBN_generate_prime_ex()\fR but expects an old-style callback function
|
||||
\&\fBBN_generate_prime_ex()\fR but expects an old\-style callback function
|
||||
directly in the \fBcallback\fR parameter, and an argument to pass to it in
|
||||
the \fBcb_arg\fR. \fBBN_is_prime()\fR and \fBBN_is_prime_fasttest()\fR
|
||||
can similarly be compared to \fBBN_is_prime_ex()\fR and
|
||||
|
|
@ -327,12 +253,12 @@ can similarly be compared to \fBBN_is_prime_ex()\fR and
|
|||
1 if it is prime with an error probability of less than 0.25^\fBnchecks\fR, and
|
||||
\&\-1 on error.
|
||||
.PP
|
||||
\&\fBBN_generate_prime()\fR returns the prime number on success, \fB\s-1NULL\s0\fR otherwise.
|
||||
\&\fBBN_generate_prime()\fR returns the prime number on success, \fBNULL\fR otherwise.
|
||||
.PP
|
||||
BN_GENCB_new returns a pointer to a \s-1BN_GENCB\s0 structure on success, or \fB\s-1NULL\s0\fR
|
||||
BN_GENCB_new returns a pointer to a BN_GENCB structure on success, or \fBNULL\fR
|
||||
otherwise.
|
||||
.PP
|
||||
BN_GENCB_get_arg returns the argument previously associated with a \s-1BN_GENCB\s0
|
||||
BN_GENCB_get_arg returns the argument previously associated with a BN_GENCB
|
||||
structure.
|
||||
.PP
|
||||
Callback functions should return 1 on success or 0 on error.
|
||||
|
|
@ -340,14 +266,14 @@ Callback functions should return 1 on success or 0 on error.
|
|||
The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
||||
.SH "REMOVED FUNCTIONALITY"
|
||||
.IX Header "REMOVED FUNCTIONALITY"
|
||||
As of OpenSSL 1.1.0 it is no longer possible to create a \s-1BN_GENCB\s0 structure
|
||||
As of OpenSSL 1.1.0 it is no longer possible to create a BN_GENCB structure
|
||||
directly, as in:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& BN_GENCB callback;
|
||||
.Ve
|
||||
.PP
|
||||
Instead applications should create a \s-1BN_GENCB\s0 structure using BN_GENCB_new:
|
||||
Instead applications should create a BN_GENCB structure using BN_GENCB_new:
|
||||
.PP
|
||||
.Vb 6
|
||||
\& BN_GENCB *callback;
|
||||
|
|
@ -361,8 +287,8 @@ Instead applications should create a \s-1BN_GENCB\s0 structure using BN_GENCB_ne
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBDH_generate_parameters\fR\|(3), \fBDSA_generate_parameters\fR\|(3),
|
||||
\&\fBRSA_generate_key\fR\|(3), \fBERR_get_error\fR\|(3), \fBRAND_bytes\fR\|(3),
|
||||
\&\s-1\fBRAND\s0\fR\|(7)
|
||||
.SH "HISTORY"
|
||||
\&\fBRAND\fR\|(7)
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBN_is_prime_ex()\fR and \fBBN_is_prime_fasttest_ex()\fR functions were
|
||||
deprecated in OpenSSL 3.0.
|
||||
|
|
@ -371,11 +297,11 @@ The \fBBN_GENCB_new()\fR, \fBBN_GENCB_free()\fR,
|
|||
and \fBBN_GENCB_get_arg()\fR functions were added in OpenSSL 1.1.0.
|
||||
.PP
|
||||
\&\fBBN_check_prime()\fR was added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2000\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_MOD_EXP_MONT 3ossl"
|
||||
.TH BN_MOD_EXP_MONT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_MOD_EXP_MONT 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_mod_exp_mont, BN_mod_exp_mont_consttime, BN_mod_exp_mont_consttime_x2 \-
|
||||
Montgomery exponentiation
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -160,19 +85,19 @@ Montgomery exponentiation
|
|||
\& const BIGNUM *m2, BN_MONT_CTX *in_mont2,
|
||||
\& BN_CTX *ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_mod_exp_mont()\fR computes \fIa\fR to the \fIp\fR\-th power modulo \fIm\fR (\f(CW\*(C`rr=a^p % m\*(C'\fR)
|
||||
using Montgomery multiplication. \fIin_mont\fR is a Montgomery context and can be
|
||||
\&\s-1NULL.\s0 In the case \fIin_mont\fR is \s-1NULL,\s0 it will be initialized within the
|
||||
NULL. In the case \fIin_mont\fR is NULL, it will be initialized within the
|
||||
function, so you can save time on initialization if you provide it in advance.
|
||||
.PP
|
||||
\&\fBBN_mod_exp_mont_consttime()\fR computes \fIa\fR to the \fIp\fR\-th power modulo \fIm\fR
|
||||
(\f(CW\*(C`rr=a^p % m\*(C'\fR) using Montgomery multiplication. It is a variant of
|
||||
\&\fBBN_mod_exp_mont\fR\|(3) that uses fixed windows and the special precomputation
|
||||
memory layout to limit data-dependency to a minimum to protect secret exponents.
|
||||
memory layout to limit data\-dependency to a minimum to protect secret exponents.
|
||||
It is called automatically when \fBBN_mod_exp_mont\fR\|(3) is called with parameters
|
||||
\&\fIa\fR, \fIp\fR, \fIm\fR, any of which have \fB\s-1BN_FLG_CONSTTIME\s0\fR flag.
|
||||
\&\fIa\fR, \fIp\fR, \fIm\fR, any of which have \fBBN_FLG_CONSTTIME\fR flag.
|
||||
.PP
|
||||
\&\fBBN_mod_exp_mont_consttime_x2()\fR computes two independent exponentiations \fIa1\fR to
|
||||
the \fIp1\fR\-th power modulo \fIm1\fR (\f(CW\*(C`rr1=a1^p1 % m1\*(C'\fR) and \fIa2\fR to the \fIp2\fR\-th
|
||||
|
|
@ -187,11 +112,11 @@ The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBBN_mod_exp_mont\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_MOD_INVERSE 3ossl"
|
||||
.TH BN_MOD_INVERSE 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_MOD_INVERSE 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_mod_inverse \- compute inverse modulo n
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -148,26 +73,29 @@ BN_mod_inverse \- compute inverse modulo n
|
|||
\& BIGNUM *BN_mod_inverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n,
|
||||
\& BN_CTX *ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_mod_inverse()\fR computes the inverse of \fBa\fR modulo \fBn\fR
|
||||
places the result in \fBr\fR (\f(CW\*(C`(a*r)%n==1\*(C'\fR). If \fBr\fR is \s-1NULL,\s0
|
||||
a new \fB\s-1BIGNUM\s0\fR is created.
|
||||
places the result in \fBr\fR (\f(CW\*(C`(a*r)%n==1\*(C'\fR). If \fBr\fR is NULL,
|
||||
a new \fBBIGNUM\fR is created.
|
||||
.PP
|
||||
\&\fBctx\fR is a previously allocated \fB\s-1BN_CTX\s0\fR used for temporary
|
||||
variables. \fBr\fR may be the same \fB\s-1BIGNUM\s0\fR as \fBa\fR or \fBn\fR.
|
||||
\&\fBctx\fR is a previously allocated \fBBN_CTX\fR used for temporary
|
||||
variables. \fBr\fR may be the same \fBBIGNUM\fR as \fBa\fR.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
It is an error to use the same \fBBIGNUM\fR as \fBn\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_mod_inverse()\fR returns the \fB\s-1BIGNUM\s0\fR containing the inverse, and
|
||||
\&\s-1NULL\s0 on error. The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
||||
\&\fBBN_mod_inverse()\fR returns the \fBBIGNUM\fR containing the inverse, and
|
||||
NULL on error. The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBBN_add\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_MOD_MUL_MONTGOMERY 3ossl"
|
||||
.TH BN_MOD_MUL_MONTGOMERY 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_MOD_MUL_MONTGOMERY 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_mod_mul_montgomery, BN_MONT_CTX_new,
|
||||
BN_MONT_CTX_free, BN_MONT_CTX_set, BN_MONT_CTX_copy,
|
||||
BN_from_montgomery, BN_to_montgomery \- Montgomery multiplication
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -162,23 +87,23 @@ BN_from_montgomery, BN_to_montgomery \- Montgomery multiplication
|
|||
\& int BN_to_montgomery(BIGNUM *r, BIGNUM *a, BN_MONT_CTX *mont,
|
||||
\& BN_CTX *ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
These functions implement Montgomery multiplication. They are used
|
||||
automatically when \fBBN_mod_exp\fR\|(3) is called with suitable input,
|
||||
but they may be useful when several operations are to be performed
|
||||
using the same modulus.
|
||||
.PP
|
||||
\&\fBBN_MONT_CTX_new()\fR allocates and initializes a \fB\s-1BN_MONT_CTX\s0\fR structure.
|
||||
\&\fBBN_MONT_CTX_new()\fR allocates and initializes a \fBBN_MONT_CTX\fR structure.
|
||||
.PP
|
||||
\&\fBBN_MONT_CTX_set()\fR sets up the \fImont\fR structure from the modulus \fIm\fR
|
||||
by precomputing its inverse and a value R.
|
||||
.PP
|
||||
\&\fBBN_MONT_CTX_copy()\fR copies the \fB\s-1BN_MONT_CTX\s0\fR \fIfrom\fR to \fIto\fR.
|
||||
\&\fBBN_MONT_CTX_copy()\fR copies the \fBBN_MONT_CTX\fR \fIfrom\fR to \fIto\fR.
|
||||
.PP
|
||||
\&\fBBN_MONT_CTX_free()\fR frees the components of the \fB\s-1BN_MONT_CTX\s0\fR, and, if
|
||||
\&\fBBN_MONT_CTX_free()\fR frees the components of the \fBBN_MONT_CTX\fR, and, if
|
||||
it was created by \fBBN_MONT_CTX_new()\fR, also the structure itself.
|
||||
If \fBmont\fR is \s-1NULL,\s0 nothing is done.
|
||||
If \fBmont\fR is NULL, nothing is done.
|
||||
.PP
|
||||
\&\fBBN_mod_mul_montgomery()\fR computes Mont(\fIa\fR,\fIb\fR):=\fIa\fR*\fIb\fR*R^\-1 and places
|
||||
the result in \fIr\fR.
|
||||
|
|
@ -188,18 +113,18 @@ the result in \fIr\fR.
|
|||
\&\fBBN_to_montgomery()\fR computes Mont(\fIa\fR,R^2), i.e. \fIa\fR*R.
|
||||
Note that \fIa\fR must be nonnegative and smaller than the modulus.
|
||||
.PP
|
||||
For all functions, \fIctx\fR is a previously allocated \fB\s-1BN_CTX\s0\fR used for
|
||||
For all functions, \fIctx\fR is a previously allocated \fBBN_CTX\fR used for
|
||||
temporary variables.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_MONT_CTX_new()\fR returns the newly allocated \fB\s-1BN_MONT_CTX\s0\fR, and \s-1NULL\s0
|
||||
\&\fBBN_MONT_CTX_new()\fR returns the newly allocated \fBBN_MONT_CTX\fR, and NULL
|
||||
on error.
|
||||
.PP
|
||||
\&\fBBN_MONT_CTX_free()\fR has no return value.
|
||||
.PP
|
||||
For the other functions, 1 is returned for success, 0 on error.
|
||||
The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
||||
.SH "WARNINGS"
|
||||
.SH WARNINGS
|
||||
.IX Header "WARNINGS"
|
||||
The inputs must be reduced modulo \fBm\fR, otherwise the result will be
|
||||
outside the expected range.
|
||||
|
|
@ -207,14 +132,14 @@ outside the expected range.
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBBN_add\fR\|(3),
|
||||
\&\fBBN_CTX_new\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBN_MONT_CTX_init()\fR was removed in OpenSSL 1.1.0
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_MOD_MUL_RECIPROCAL 3ossl"
|
||||
.TH BN_MOD_MUL_RECIPROCAL 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_MOD_MUL_RECIPROCAL 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_mod_mul_reciprocal, BN_div_recp, BN_RECP_CTX_new,
|
||||
BN_RECP_CTX_free, BN_RECP_CTX_set \- modular multiplication using
|
||||
reciprocal
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -158,19 +83,19 @@ reciprocal
|
|||
\& int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
\& BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_mod_mul_reciprocal()\fR can be used to perform an efficient
|
||||
\&\fBBN_mod_mul\fR\|(3) operation when the operation will be performed
|
||||
repeatedly with the same modulus. It computes \fBr\fR=(\fBa\fR*\fBb\fR)%\fBm\fR
|
||||
using \fBrecp\fR=1/\fBm\fR, which is set as described below. \fBctx\fR is a
|
||||
previously allocated \fB\s-1BN_CTX\s0\fR used for temporary variables.
|
||||
previously allocated \fBBN_CTX\fR used for temporary variables.
|
||||
.PP
|
||||
\&\fBBN_RECP_CTX_new()\fR allocates and initializes a \fB\s-1BN_RECP\s0\fR structure.
|
||||
\&\fBBN_RECP_CTX_new()\fR allocates and initializes a \fBBN_RECP\fR structure.
|
||||
.PP
|
||||
\&\fBBN_RECP_CTX_free()\fR frees the components of the \fB\s-1BN_RECP\s0\fR, and, if it
|
||||
\&\fBBN_RECP_CTX_free()\fR frees the components of the \fBBN_RECP\fR, and, if it
|
||||
was created by \fBBN_RECP_CTX_new()\fR, also the structure itself.
|
||||
If \fBrecp\fR is \s-1NULL,\s0 nothing is done.
|
||||
If \fBrecp\fR is NULL, nothing is done.
|
||||
.PP
|
||||
\&\fBBN_RECP_CTX_set()\fR stores \fBm\fR in \fBrecp\fR and sets it up for computing
|
||||
1/\fBm\fR and shifting it left by BN_num_bits(\fBm\fR)+1 to make it an
|
||||
|
|
@ -180,10 +105,10 @@ later be stored in \fBrecp\fR.
|
|||
\&\fBBN_div_recp()\fR divides \fBa\fR by \fBm\fR using \fBrecp\fR. It places the quotient
|
||||
in \fBdv\fR and the remainder in \fBrem\fR.
|
||||
.PP
|
||||
The \fB\s-1BN_RECP_CTX\s0\fR structure cannot be shared between threads.
|
||||
The \fBBN_RECP_CTX\fR structure cannot be shared between threads.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_RECP_CTX_new()\fR returns the newly allocated \fB\s-1BN_RECP_CTX\s0\fR, and \s-1NULL\s0
|
||||
\&\fBBN_RECP_CTX_new()\fR returns the newly allocated \fBBN_RECP_CTX\fR, and NULL
|
||||
on error.
|
||||
.PP
|
||||
\&\fBBN_RECP_CTX_free()\fR has no return value.
|
||||
|
|
@ -194,14 +119,14 @@ The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBBN_add\fR\|(3),
|
||||
\&\fBBN_CTX_new\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBN_RECP_CTX_init()\fR was removed in OpenSSL 1.1.0
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_NEW 3ossl"
|
||||
.TH BN_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_NEW 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_new, BN_secure_new, BN_clear, BN_free, BN_clear_free \- allocate and free BIGNUMs
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -155,41 +80,41 @@ BN_new, BN_secure_new, BN_clear, BN_free, BN_clear_free \- allocate and free BIG
|
|||
\&
|
||||
\& void BN_clear_free(BIGNUM *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_new()\fR allocates and initializes a \fB\s-1BIGNUM\s0\fR structure.
|
||||
\&\fBBN_new()\fR allocates and initializes a \fBBIGNUM\fR structure.
|
||||
\&\fBBN_secure_new()\fR does the same except that the secure heap
|
||||
\&\fBOPENSSL_secure_malloc\fR\|(3) is used to store the value.
|
||||
.PP
|
||||
\&\fBBN_clear()\fR is used to destroy sensitive data such as keys when they
|
||||
are no longer needed. It erases the memory used by \fBa\fR and sets it
|
||||
to the value 0.
|
||||
If \fBa\fR is \s-1NULL,\s0 nothing is done.
|
||||
If \fBa\fR is NULL, nothing is done.
|
||||
.PP
|
||||
\&\fBBN_free()\fR frees the components of the \fB\s-1BIGNUM\s0\fR, and if it was created
|
||||
\&\fBBN_free()\fR frees the components of the \fBBIGNUM\fR, and if it was created
|
||||
by \fBBN_new()\fR, also the structure itself. \fBBN_clear_free()\fR additionally
|
||||
overwrites the data before the memory is returned to the system.
|
||||
If \fBa\fR is \s-1NULL,\s0 nothing is done.
|
||||
If \fBa\fR is NULL, nothing is done.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_new()\fR and \fBBN_secure_new()\fR
|
||||
return a pointer to the \fB\s-1BIGNUM\s0\fR initialised to the value 0.
|
||||
return a pointer to the \fBBIGNUM\fR initialised to the value 0.
|
||||
If the allocation fails,
|
||||
they return \fB\s-1NULL\s0\fR and set an error code that can be obtained
|
||||
they return \fBNULL\fR and set an error code that can be obtained
|
||||
by \fBERR_get_error\fR\|(3).
|
||||
.PP
|
||||
\&\fBBN_clear()\fR, \fBBN_free()\fR and \fBBN_clear_free()\fR have no return values.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBOPENSSL_secure_malloc\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBN_init()\fR was removed in OpenSSL 1.1.0; use \fBBN_new()\fR instead.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_NUM_BYTES 3ossl"
|
||||
.TH BN_NUM_BYTES 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_NUM_BYTES 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_num_bits, BN_num_bytes, BN_num_bits_word \- get BIGNUM size
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -151,42 +76,42 @@ BN_num_bits, BN_num_bytes, BN_num_bits_word \- get BIGNUM size
|
|||
\&
|
||||
\& int BN_num_bits_word(BN_ULONG w);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_num_bytes()\fR returns the size of a \fB\s-1BIGNUM\s0\fR in bytes.
|
||||
\&\fBBN_num_bytes()\fR returns the size of a \fBBIGNUM\fR in bytes.
|
||||
.PP
|
||||
\&\fBBN_num_bits_word()\fR returns the number of significant bits in a word.
|
||||
If we take 0x00000432 as an example, it returns 11, not 16, not 32.
|
||||
Basically, except for a zero, it returns \fIfloor(log2(w))+1\fR.
|
||||
.PP
|
||||
\&\fBBN_num_bits()\fR returns the number of significant bits in a \fB\s-1BIGNUM\s0\fR,
|
||||
\&\fBBN_num_bits()\fR returns the number of significant bits in a \fBBIGNUM\fR,
|
||||
following the same principle as \fBBN_num_bits_word()\fR.
|
||||
.PP
|
||||
\&\fBBN_num_bytes()\fR is a macro.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
The size.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Some have tried using \fBBN_num_bits()\fR on individual numbers in \s-1RSA\s0 keys,
|
||||
\&\s-1DH\s0 keys and \s-1DSA\s0 keys, and found that they don't always come up with
|
||||
Some have tried using \fBBN_num_bits()\fR on individual numbers in RSA keys,
|
||||
DH keys and DSA keys, and found that they don\*(Aqt always come up with
|
||||
the number of bits they expected (something like 512, 1024, 2048,
|
||||
\&...). This is because generating a number with some specific number
|
||||
of bits doesn't always set the highest bits, thereby making the number
|
||||
of \fIsignificant\fR bits a little lower. If you want to know the \*(L"key
|
||||
size\*(R" of such a key, either use functions like \fBRSA_size()\fR, \fBDH_size()\fR
|
||||
of bits doesn\*(Aqt always set the highest bits, thereby making the number
|
||||
of \fIsignificant\fR bits a little lower. If you want to know the "key
|
||||
size" of such a key, either use functions like \fBRSA_size()\fR, \fBDH_size()\fR
|
||||
and \fBDSA_size()\fR, or use \fBBN_num_bytes()\fR and multiply with 8 (although
|
||||
there's no real guarantee that will match the \*(L"key size\*(R", just a lot
|
||||
there\*(Aqs no real guarantee that will match the "key size", just a lot
|
||||
more probability).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBDH_size\fR\|(3), \fBDSA_size\fR\|(3),
|
||||
\&\fBRSA_size\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_RAND 3ossl"
|
||||
.TH BN_RAND 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_RAND 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_rand_ex, BN_rand, BN_priv_rand_ex, BN_priv_rand, BN_pseudo_rand,
|
||||
BN_rand_range_ex, BN_rand_range, BN_priv_rand_range_ex, BN_priv_rand_range,
|
||||
BN_pseudo_rand_range
|
||||
\&\- generate pseudo\-random number
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -166,42 +91,42 @@ BN_pseudo_rand_range
|
|||
.Ve
|
||||
.PP
|
||||
The following functions have been deprecated since OpenSSL 3.0, and can be
|
||||
hidden entirely by defining \fB\s-1OPENSSL_API_COMPAT\s0\fR with a suitable version value,
|
||||
hidden entirely by defining \fBOPENSSL_API_COMPAT\fR with a suitable version value,
|
||||
see \fBopenssl_user_macros\fR\|(7):
|
||||
.PP
|
||||
.Vb 2
|
||||
\& int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
\& int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_rand_ex()\fR generates a cryptographically strong pseudo-random
|
||||
\&\fBBN_rand_ex()\fR generates a cryptographically strong pseudo\-random
|
||||
number of \fIbits\fR in length and security strength at least \fIstrength\fR bits
|
||||
using the random number generator for the library context associated with
|
||||
\&\fIctx\fR. The function stores the generated data in \fIrnd\fR. The parameter \fIctx\fR
|
||||
may be \s-1NULL\s0 in which case the default library context is used.
|
||||
may be NULL in which case the default library context is used.
|
||||
If \fIbits\fR is less than zero, or too small to
|
||||
accommodate the requirements specified by the \fItop\fR and \fIbottom\fR
|
||||
parameters, an error is returned.
|
||||
The \fItop\fR parameters specifies
|
||||
requirements on the most significant bit of the generated number.
|
||||
If it is \fB\s-1BN_RAND_TOP_ANY\s0\fR, there is no constraint.
|
||||
If it is \fB\s-1BN_RAND_TOP_ONE\s0\fR, the top bit must be one.
|
||||
If it is \fB\s-1BN_RAND_TOP_TWO\s0\fR, the two most significant bits of
|
||||
If it is \fBBN_RAND_TOP_ANY\fR, there is no constraint.
|
||||
If it is \fBBN_RAND_TOP_ONE\fR, the top bit must be one.
|
||||
If it is \fBBN_RAND_TOP_TWO\fR, the two most significant bits of
|
||||
the number will be set to 1, so that the product of two such random
|
||||
numbers will always have 2*\fIbits\fR length.
|
||||
If \fIbottom\fR is \fB\s-1BN_RAND_BOTTOM_ODD\s0\fR, the number will be odd; if it
|
||||
is \fB\s-1BN_RAND_BOTTOM_ANY\s0\fR it can be odd or even.
|
||||
If \fIbits\fR is 1 then \fItop\fR cannot also be \fB\s-1BN_RAND_TOP_TWO\s0\fR.
|
||||
If \fIbottom\fR is \fBBN_RAND_BOTTOM_ODD\fR, the number will be odd; if it
|
||||
is \fBBN_RAND_BOTTOM_ANY\fR it can be odd or even.
|
||||
If \fIbits\fR is 1 then \fItop\fR cannot also be \fBBN_RAND_TOP_TWO\fR.
|
||||
.PP
|
||||
\&\fBBN_rand()\fR is the same as \fBBN_rand_ex()\fR except that the default library context
|
||||
is always used.
|
||||
.PP
|
||||
\&\fBBN_rand_range_ex()\fR generates a cryptographically strong pseudo-random
|
||||
\&\fBBN_rand_range_ex()\fR generates a cryptographically strong pseudo\-random
|
||||
number \fIrnd\fR, of security strength at least \fIstrength\fR bits,
|
||||
in the range 0 <= \fIrnd\fR < \fIrange\fR using the random number
|
||||
generator for the library context associated with \fIctx\fR. The parameter \fIctx\fR
|
||||
may be \s-1NULL\s0 in which case the default library context is used.
|
||||
may be NULL in which case the default library context is used.
|
||||
.PP
|
||||
\&\fBBN_rand_range()\fR is the same as \fBBN_rand_range_ex()\fR except that the default
|
||||
library context is always used.
|
||||
|
|
@ -211,10 +136,10 @@ library context is always used.
|
|||
\&\fBBN_rand_range_ex()\fR and \fBBN_rand_range()\fR respectively. They are intended to be
|
||||
used for generating values that should remain private, and mirror the
|
||||
same difference between \fBRAND_bytes\fR\|(3) and \fBRAND_priv_bytes\fR\|(3).
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Always check the error return value of these functions and do not take
|
||||
randomness for granted: an error occurs if the \s-1CSPRNG\s0 has not been
|
||||
randomness for granted: an error occurs if the CSPRNG has not been
|
||||
seeded with enough randomness to ensure an unpredictable byte sequence.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
|
|
@ -226,27 +151,27 @@ The error codes can be obtained by \fBERR_get_error\fR\|(3).
|
|||
\&\fBRAND_add\fR\|(3),
|
||||
\&\fBRAND_bytes\fR\|(3),
|
||||
\&\fBRAND_priv_bytes\fR\|(3),
|
||||
\&\s-1\fBRAND\s0\fR\|(7),
|
||||
\&\s-1\fBEVP_RAND\s0\fR\|(7)
|
||||
.SH "HISTORY"
|
||||
\&\fBRAND\fR\|(7),
|
||||
\&\fBEVP_RAND\fR\|(7)
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
.IP "\(bu" 2
|
||||
.IP \(bu 2
|
||||
Starting with OpenSSL release 1.1.0, \fBBN_pseudo_rand()\fR has been identical
|
||||
to \fBBN_rand()\fR and \fBBN_pseudo_rand_range()\fR has been identical to
|
||||
\&\fBBN_rand_range()\fR.
|
||||
The \fBBN_pseudo_rand()\fR and \fBBN_pseudo_rand_range()\fR functions were
|
||||
deprecated in OpenSSL 3.0.
|
||||
.IP "\(bu" 2
|
||||
.IP \(bu 2
|
||||
The \fBBN_priv_rand()\fR and \fBBN_priv_rand_range()\fR functions were added in
|
||||
OpenSSL 1.1.1.
|
||||
.IP "\(bu" 2
|
||||
.IP \(bu 2
|
||||
The \fBBN_rand_ex()\fR, \fBBN_priv_rand_ex()\fR, \fBBN_rand_range_ex()\fR and
|
||||
\&\fBBN_priv_rand_range_ex()\fR functions were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,113 +53,54 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_SECURITY_BITS 3ossl"
|
||||
.TH BN_SECURITY_BITS 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_SECURITY_BITS 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_security_bits \- returns bits of security based on given numbers
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
\&
|
||||
\& int BN_security_bits(int L, int N);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_security_bits()\fR returns the number of bits of security provided by a
|
||||
specific algorithm and a particular key size. The bits of security is
|
||||
defined in \s-1NIST SP800\-57.\s0 Currently, \fBBN_security_bits()\fR support two types
|
||||
of asymmetric algorithms: the \s-1FFC\s0 (Finite Field Cryptography) and \s-1IFC\s0
|
||||
(Integer Factorization Cryptography). For \s-1FFC,\s0 e.g., \s-1DSA\s0 and \s-1DH,\s0 both
|
||||
defined in NIST SP800\-57. Currently, \fBBN_security_bits()\fR support two types
|
||||
of asymmetric algorithms: the FFC (Finite Field Cryptography) and IFC
|
||||
(Integer Factorization Cryptography). For FFC, e.g., DSA and DH, both
|
||||
parameters \fBL\fR and \fBN\fR are used to decide the bits of security, where
|
||||
\&\fBL\fR is the size of the public key and \fBN\fR is the size of the private
|
||||
key. For \s-1IFC,\s0 e.g., \s-1RSA,\s0 only \fBL\fR is used and it's commonly considered
|
||||
key. For IFC, e.g., RSA, only \fBL\fR is used and it\*(Aqs commonly considered
|
||||
to be the key size (modulus).
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
Number of security bits.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
\&\s-1ECC\s0 (Elliptic Curve Cryptography) is not covered by the \fBBN_security_bits()\fR
|
||||
ECC (Elliptic Curve Cryptography) is not covered by the \fBBN_security_bits()\fR
|
||||
function. The symmetric algorithms are not covered neither.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBDH_security_bits\fR\|(3), \fBDSA_security_bits\fR\|(3), \fBRSA_security_bits\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBN_security_bits()\fR function was added in OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2017\-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_SET_BIT 3ossl"
|
||||
.TH BN_SET_BIT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_SET_BIT 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_set_bit, BN_clear_bit, BN_is_bit_set, BN_mask_bits, BN_lshift,
|
||||
BN_lshift1, BN_rshift, BN_rshift1 \- bit operations on BIGNUMs
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -159,7 +84,7 @@ BN_lshift1, BN_rshift, BN_rshift1 \- bit operations on BIGNUMs
|
|||
\& int BN_rshift(BIGNUM *r, BIGNUM *a, int n);
|
||||
\& int BN_rshift1(BIGNUM *r, BIGNUM *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_set_bit()\fR sets bit \fBn\fR in \fBa\fR to 1 (\f(CW\*(C`a|=(1<<n)\*(C'\fR). The
|
||||
number is expanded if necessary.
|
||||
|
|
@ -170,8 +95,11 @@ error occurs if \fBa\fR is shorter than \fBn\fR bits.
|
|||
\&\fBBN_is_bit_set()\fR tests if bit \fBn\fR in \fBa\fR is set.
|
||||
.PP
|
||||
\&\fBBN_mask_bits()\fR truncates \fBa\fR to an \fBn\fR bit number
|
||||
(\f(CW\*(C`a&=~((~0)<<n)\*(C'\fR). An error occurs if \fBa\fR already is
|
||||
shorter than \fBn\fR bits.
|
||||
(\f(CW\*(C`a&=~((~0)<<n)\*(C'\fR). An error occurs if \fBn\fR is negative. An error is
|
||||
also returned if the internal representation of \fBa\fR is already shorter than
|
||||
\&\fBn\fR bits. The internal representation depends on the platform\*(Aqs word size, and
|
||||
this error can be safely ignored. Use \fBBN_num_bits\fR\|(3) to determine the exact
|
||||
number of bits if needed.
|
||||
.PP
|
||||
\&\fBBN_lshift()\fR shifts \fBa\fR left by \fBn\fR bits and places the result in
|
||||
\&\fBr\fR (\f(CW\*(C`r=a*2^n\*(C'\fR). Note that \fBn\fR must be nonnegative. \fBBN_lshift1()\fR shifts
|
||||
|
|
@ -191,11 +119,11 @@ can be obtained by \fBERR_get_error\fR\|(3).
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBBN_num_bytes\fR\|(3), \fBBN_add\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2000\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,95 +53,36 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_SWAP 3ossl"
|
||||
.TH BN_SWAP 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_SWAP 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_swap \- exchange BIGNUMs
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
\&
|
||||
\& void BN_swap(BIGNUM *a, BIGNUM *b);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBN_swap()\fR exchanges the values of \fIa\fR and \fIb\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_swap()\fR does not return a value.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BN_ZERO 3ossl"
|
||||
.TH BN_ZERO 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BN_ZERO 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word \- BIGNUM assignment
|
||||
operations
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/bn.h>
|
||||
|
|
@ -154,45 +79,45 @@ operations
|
|||
\& int BN_set_word(BIGNUM *a, BN_ULONG w);
|
||||
\& unsigned BN_ULONG BN_get_word(BIGNUM *a);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fB\s-1BN_ULONG\s0\fR is a macro that will be an unsigned integral type optimized
|
||||
\&\fBBN_ULONG\fR is a macro that will be an unsigned integral type optimized
|
||||
for the most efficient implementation on the local platform.
|
||||
.PP
|
||||
\&\fBBN_zero()\fR, \fBBN_one()\fR and \fBBN_set_word()\fR set \fBa\fR to the values 0, 1 and
|
||||
\&\fBw\fR respectively. \fBBN_zero()\fR and \fBBN_one()\fR are macros.
|
||||
.PP
|
||||
\&\fBBN_value_one()\fR returns a \fB\s-1BIGNUM\s0\fR constant of value 1. This constant
|
||||
\&\fBBN_value_one()\fR returns a \fBBIGNUM\fR constant of value 1. This constant
|
||||
is useful for use in comparisons and assignment.
|
||||
.PP
|
||||
\&\fBBN_get_word()\fR returns \fBa\fR, if it can be represented as a \fB\s-1BN_ULONG\s0\fR.
|
||||
\&\fBBN_get_word()\fR returns \fBa\fR, if it can be represented as a \fBBN_ULONG\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBN_get_word()\fR returns the value \fBa\fR, or all-bits-set if \fBa\fR cannot
|
||||
\&\fBBN_get_word()\fR returns the value \fBa\fR, or all\-bits\-set if \fBa\fR cannot
|
||||
be represented as a single integer.
|
||||
.PP
|
||||
\&\fBBN_one()\fR and \fBBN_set_word()\fR return 1 on success, 0 otherwise.
|
||||
\&\fBBN_value_one()\fR returns the constant.
|
||||
\&\fBBN_zero()\fR never fails and returns no value.
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
If a \fB\s-1BIGNUM\s0\fR is equal to the value of all-bits-set, it will collide
|
||||
If a \fBBIGNUM\fR is equal to the value of all\-bits\-set, it will collide
|
||||
with the error condition returned by \fBBN_get_word()\fR which uses that
|
||||
as an error value.
|
||||
.PP
|
||||
\&\fB\s-1BN_ULONG\s0\fR should probably be a typedef.
|
||||
\&\fBBN_ULONG\fR should probably be a typedef.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBBN_bn2bin\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
In OpenSSL 0.9.8, \fBBN_zero()\fR was changed to not return a value; previous
|
||||
versions returned an int.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BUF_MEM_NEW 3ossl"
|
||||
.TH BUF_MEM_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH BUF_MEM_NEW 3ossl 2024-09-28 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
BUF_MEM_new, BUF_MEM_new_ex, BUF_MEM_free, BUF_MEM_grow,
|
||||
BUF_MEM_grow_clean, BUF_reverse
|
||||
\&\- simple character array structure
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/buffer.h>
|
||||
|
|
@ -158,7 +83,7 @@ BUF_MEM_grow_clean, BUF_reverse
|
|||
\&
|
||||
\& void BUF_reverse(unsigned char *out, const unsigned char *in, size_t size);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The buffer library handles simple character arrays. Buffers are used for
|
||||
various purposes in the library, most notably memory BIOs.
|
||||
|
|
@ -166,24 +91,25 @@ various purposes in the library, most notably memory BIOs.
|
|||
\&\fBBUF_MEM_new()\fR allocates a new buffer of zero size.
|
||||
.PP
|
||||
\&\fBBUF_MEM_new_ex()\fR allocates a buffer with the specified flags.
|
||||
The flag \fB\s-1BUF_MEM_FLAG_SECURE\s0\fR specifies that the \fBdata\fR pointer
|
||||
The flag \fBBUF_MEM_FLAG_SECURE\fR specifies that the \fBdata\fR pointer
|
||||
should be allocated on the secure heap; see \fBCRYPTO_secure_malloc\fR\|(3).
|
||||
.PP
|
||||
\&\fBBUF_MEM_free()\fR frees up an already existing buffer. The data is zeroed
|
||||
before freeing up in case the buffer contains sensitive data.
|
||||
If the argument is NULL, nothing is done.
|
||||
.PP
|
||||
\&\fBBUF_MEM_grow()\fR changes the size of an already existing buffer to
|
||||
\&\fBlen\fR. Any data already in the buffer is preserved if it increases in
|
||||
size.
|
||||
.PP
|
||||
\&\fBBUF_MEM_grow_clean()\fR is similar to \fBBUF_MEM_grow()\fR but it sets any free'd
|
||||
or additionally-allocated memory to zero.
|
||||
\&\fBBUF_MEM_grow_clean()\fR is similar to \fBBUF_MEM_grow()\fR but it sets any free\*(Aqd
|
||||
or additionally\-allocated memory to zero.
|
||||
.PP
|
||||
\&\fBBUF_reverse()\fR reverses \fBsize\fR bytes at \fBin\fR into \fBout\fR. If \fBin\fR
|
||||
is \s-1NULL,\s0 the array is reversed in-place.
|
||||
is NULL, the array is reversed in\-place.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBUF_MEM_new()\fR returns the buffer or \s-1NULL\s0 on error.
|
||||
\&\fBBUF_MEM_new()\fR returns the buffer or NULL on error.
|
||||
.PP
|
||||
\&\fBBUF_MEM_free()\fR has no return value.
|
||||
.PP
|
||||
|
|
@ -193,14 +119,14 @@ zero on error or the new size (i.e., \fBlen\fR).
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBbio\fR\|(7),
|
||||
\&\fBCRYPTO_secure_malloc\fR\|(3).
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBBUF_MEM_new_ex()\fR function was added in OpenSSL 1.1.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2000\-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_ENCRYPTEDDATA_DECRYPT 3ossl"
|
||||
.TH CMS_ENCRYPTEDDATA_DECRYPT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_ENCRYPTEDDATA_DECRYPT 3ossl 2026-02-03 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_EncryptedData_decrypt
|
||||
\&\- Decrypt CMS EncryptedData
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -150,17 +75,17 @@ CMS_EncryptedData_decrypt
|
|||
\& const unsigned char *key, size_t keylen,
|
||||
\& BIO *dcont, BIO *out, unsigned int flags);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_EncryptedData_decrypt()\fR decrypts a \fIcms\fR EncryptedData object using the
|
||||
symmetric \fIkey\fR of size \fIkeylen\fR bytes. \fIout\fR is a \s-1BIO\s0 to write the content
|
||||
symmetric \fIkey\fR of size \fIkeylen\fR bytes. \fIout\fR is a BIO to write the content
|
||||
to and \fIflags\fR is an optional set of flags.
|
||||
\&\fIdcont\fR is used in the rare case where the encrypted content is detached. It
|
||||
will normally be set to \s-1NULL.\s0
|
||||
will normally be set to NULL.
|
||||
.PP
|
||||
The following flags can be passed in the \fIflags\fR parameter.
|
||||
.PP
|
||||
If the \fB\s-1CMS_TEXT\s0\fR flag is set \s-1MIME\s0 headers for type \f(CW\*(C`text/plain\*(C'\fR are deleted
|
||||
If the \fBCMS_TEXT\fR flag is set MIME headers for type \f(CW\*(C`text/plain\*(C'\fR are deleted
|
||||
from the content. If the content is not of type \f(CW\*(C`text/plain\*(C'\fR then an error is
|
||||
returned.
|
||||
.SH "RETURN VALUES"
|
||||
|
|
@ -170,11 +95,11 @@ returns 1.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_EncryptedData_encrypt\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2020\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_ENCRYPTEDDATA_ENCRYPT 3ossl"
|
||||
.TH CMS_ENCRYPTEDDATA_ENCRYPT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_ENCRYPTEDDATA_ENCRYPT 3ossl 2026-02-03 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_EncryptedData_encrypt_ex, CMS_EncryptedData_encrypt
|
||||
\&\- Create CMS EncryptedData
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -158,43 +83,43 @@ CMS_EncryptedData_encrypt_ex, CMS_EncryptedData_encrypt
|
|||
\& const EVP_CIPHER *cipher, const unsigned char *key, size_t keylen,
|
||||
\& unsigned int flags);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_EncryptedData_encrypt_ex()\fR creates a \fBCMS_ContentInfo\fR structure
|
||||
with a type \fBNID_pkcs7_encrypted\fR. \fIin\fR is a \s-1BIO\s0 containing the data to
|
||||
with a type \fBNID_pkcs7_encrypted\fR. \fIin\fR is a BIO containing the data to
|
||||
encrypt using \fIcipher\fR and the encryption key \fIkey\fR of size \fIkeylen\fR bytes.
|
||||
The library context \fIlibctx\fR and the property query \fIpropq\fR are used when
|
||||
retrieving algorithms from providers. \fIflags\fR is a set of optional flags.
|
||||
.PP
|
||||
The \fIflags\fR field supports the options \fB\s-1CMS_DETACHED\s0\fR, \fB\s-1CMS_STREAM\s0\fR and
|
||||
\&\fB\s-1CMS_PARTIAL\s0\fR. Internally \fBCMS_final()\fR is called unless \fB\s-1CMS_STREAM\s0\fR and/or
|
||||
\&\fB\s-1CMS_PARTIAL\s0\fR is specified.
|
||||
The \fIflags\fR field supports the options \fBCMS_DETACHED\fR, \fBCMS_STREAM\fR and
|
||||
\&\fBCMS_PARTIAL\fR. Internally \fBCMS_final()\fR is called unless \fBCMS_STREAM\fR and/or
|
||||
\&\fBCMS_PARTIAL\fR is specified.
|
||||
.PP
|
||||
The algorithm passed in the \fIcipher\fR parameter must support \s-1ASN1\s0 encoding of
|
||||
The algorithm passed in the \fIcipher\fR parameter must support ASN1 encoding of
|
||||
its parameters.
|
||||
.PP
|
||||
The \fBCMS_ContentInfo\fR structure can be freed using \fBCMS_ContentInfo_free\fR\|(3).
|
||||
.PP
|
||||
\&\fBCMS_EncryptedData_encrypt()\fR is similar to \fBCMS_EncryptedData_encrypt_ex()\fR
|
||||
but uses default values of \s-1NULL\s0 for the library context \fIlibctx\fR and the
|
||||
but uses default values of NULL for the library context \fIlibctx\fR and the
|
||||
property query \fIpropq\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
If the allocation fails, \fBCMS_EncryptedData_encrypt_ex()\fR and
|
||||
\&\fBCMS_EncryptedData_encrypt()\fR return \s-1NULL\s0 and set an error code that can be
|
||||
\&\fBCMS_EncryptedData_encrypt()\fR return NULL and set an error code that can be
|
||||
obtained by \fBERR_get_error\fR\|(3). Otherwise they return a pointer to the newly
|
||||
allocated structure.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_final\fR\|(3), \fBCMS_EncryptedData_decrypt\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBCMS_EncryptedData_encrypt_ex()\fR method was added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2020\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_ENVELOPEDDATA_CREATE 3ossl"
|
||||
.TH CMS_ENVELOPEDDATA_CREATE 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_ENVELOPEDDATA_CREATE 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_EnvelopedData_create_ex, CMS_EnvelopedData_create,
|
||||
CMS_AuthEnvelopedData_create, CMS_AuthEnvelopedData_create_ex
|
||||
\&\- Create CMS envelope
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -157,7 +82,7 @@ CMS_AuthEnvelopedData_create, CMS_AuthEnvelopedData_create_ex
|
|||
\& const char *propq);
|
||||
\& CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_EnvelopedData_create_ex()\fR creates a \fBCMS_ContentInfo\fR structure
|
||||
with a type \fBNID_pkcs7_enveloped\fR. \fIcipher\fR is the symmetric cipher to use.
|
||||
|
|
@ -166,11 +91,11 @@ retrieving algorithms from providers.
|
|||
.PP
|
||||
\&\fBCMS_AuthEnvelopedData_create_ex()\fR creates a \fBCMS_ContentInfo\fR
|
||||
structure with a type \fBNID_id_smime_ct_authEnvelopedData\fR. \fBcipher\fR is the
|
||||
symmetric \s-1AEAD\s0 cipher to use. Currently only \s-1AES\s0 variants with \s-1GCM\s0 mode are
|
||||
symmetric AEAD cipher to use. Currently only AES variants with GCM mode are
|
||||
supported. The library context \fIlibctx\fR and the property query \fIpropq\fR are
|
||||
used when retrieving algorithms from providers.
|
||||
.PP
|
||||
The algorithm passed in the \fIcipher\fR parameter must support \s-1ASN1\s0 encoding of
|
||||
The algorithm passed in the \fIcipher\fR parameter must support ASN1 encoding of
|
||||
its parameters.
|
||||
.PP
|
||||
The recipients can be added later using \fBCMS_add1_recipient_cert\fR\|(3) or
|
||||
|
|
@ -181,9 +106,9 @@ and then freed using \fBCMS_ContentInfo_free\fR\|(3).
|
|||
.PP
|
||||
\&\fBCMS_EnvelopedData_create()\fR and CMS_AuthEnvelopedData_create are similar to
|
||||
\&\fBCMS_EnvelopedData_create_ex()\fR and
|
||||
\&\fBCMS_AuthEnvelopedData_create_ex()\fR but use default values of \s-1NULL\s0 for
|
||||
\&\fBCMS_AuthEnvelopedData_create_ex()\fR but use default values of NULL for
|
||||
the library context \fIlibctx\fR and the property query \fIpropq\fR.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Although \fBCMS_EnvelopedData_create()\fR and \fBCMS_AuthEnvelopedData_create()\fR allocate
|
||||
a new \fBCMS_ContentInfo\fR structure, they are not usually used in applications.
|
||||
|
|
@ -191,20 +116,20 @@ The wrappers \fBCMS_encrypt\fR\|(3) and \fBCMS_decrypt\fR\|(3) are often used in
|
|||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
If the allocation fails, \fBCMS_EnvelopedData_create()\fR and
|
||||
\&\fBCMS_AuthEnvelopedData_create()\fR return \s-1NULL\s0 and set an error code that can be
|
||||
\&\fBCMS_AuthEnvelopedData_create()\fR return NULL and set an error code that can be
|
||||
obtained by \fBERR_get_error\fR\|(3). Otherwise they return a pointer to the newly
|
||||
allocated structure.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_encrypt\fR\|(3), \fBCMS_decrypt\fR\|(3), \fBCMS_final\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBCMS_EnvelopedData_create_ex()\fR method was added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2020\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_ADD0_CERT 3ossl"
|
||||
.TH CMS_ADD0_CERT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_ADD0_CERT 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_add0_cert, CMS_add1_cert, CMS_get1_certs, CMS_add0_crl, CMS_add1_crl, CMS_get1_crls
|
||||
\&\- CMS certificate and CRL utility functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -154,27 +79,27 @@ CMS_add0_cert, CMS_add1_cert, CMS_get1_certs, CMS_add0_crl, CMS_add1_crl, CMS_ge
|
|||
\& int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
||||
\& STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_add0_cert()\fR and \fBCMS_add1_cert()\fR add certificate \fIcert\fR to \fIcms\fR.
|
||||
This is used by \fBCMS_sign_ex\fR\|(3) and \fBCMS_sign\fR\|(3) and may be used before
|
||||
calling \fBCMS_verify\fR\|(3) to help chain building in certificate validation.
|
||||
\&\fIcms\fR must be of type signed data or (authenticated) enveloped data.
|
||||
For signed data, such a certificate can be used when signing or verifying
|
||||
to fill in the signer certificate or to provide an extra \s-1CA\s0 certificate
|
||||
to fill in the signer certificate or to provide an extra CA certificate
|
||||
that may be needed for chain building in certificate validation.
|
||||
.PP
|
||||
\&\fBCMS_get1_certs()\fR returns all certificates in \fIcms\fR.
|
||||
.PP
|
||||
\&\fBCMS_add0_crl()\fR and \fBCMS_add1_crl()\fR add \s-1CRL\s0 \fIcrl\fR to \fIcms\fR.
|
||||
\&\fBCMS_add0_crl()\fR and \fBCMS_add1_crl()\fR add CRL \fIcrl\fR to \fIcms\fR.
|
||||
\&\fIcms\fR must be of type signed data or (authenticated) enveloped data.
|
||||
For signed data, such a \s-1CRL\s0 may be used in certificate validation
|
||||
For signed data, such a CRL may be used in certificate validation
|
||||
with \fBCMS_verify\fR\|(3).
|
||||
It may be given both for inclusion when signing a \s-1CMS\s0 message
|
||||
and when verifying a signed \s-1CMS\s0 message.
|
||||
It may be given both for inclusion when signing a CMS message
|
||||
and when verifying a signed CMS message.
|
||||
.PP
|
||||
\&\fBCMS_get1_crls()\fR returns all CRLs in \fIcms\fR.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The CMS_ContentInfo structure \fIcms\fR must be of type signed data or enveloped
|
||||
data or an error will be returned.
|
||||
|
|
@ -193,19 +118,19 @@ The same certificate must not be added to the same cms structure more than once.
|
|||
\&\fBCMS_add0_cert()\fR, \fBCMS_add1_cert()\fR and \fBCMS_add0_crl()\fR and \fBCMS_add1_crl()\fR return
|
||||
1 for success and 0 for failure.
|
||||
.PP
|
||||
\&\fBCMS_get1_certs()\fR and \fBCMS_get1_crls()\fR return the \s-1STACK\s0 of certificates or CRLs
|
||||
or \s-1NULL\s0 if there are none or an error occurs. The only error which will occur
|
||||
\&\fBCMS_get1_certs()\fR and \fBCMS_get1_crls()\fR return the STACK of certificates or CRLs
|
||||
or NULL if there are none or an error occurs. The only error which will occur
|
||||
in practice is if the \fIcms\fR type is invalid.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3),
|
||||
\&\fBCMS_sign\fR\|(3), \fBCMS_sign_ex\fR\|(3), \fBCMS_verify\fR\|(3),
|
||||
\&\fBCMS_encrypt\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_ADD1_RECIPIENT_CERT 3ossl"
|
||||
.TH CMS_ADD1_RECIPIENT_CERT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_ADD1_RECIPIENT_CERT 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_add1_recipient, CMS_add1_recipient_cert, CMS_add0_recipient_key \- add recipients to a CMS enveloped data structure
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -159,11 +84,11 @@ CMS_add1_recipient, CMS_add1_recipient_cert, CMS_add0_recipient_key \- add recip
|
|||
\& ASN1_OBJECT *otherTypeId,
|
||||
\& ASN1_TYPE *otherType);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_add1_recipient()\fR adds recipient \fBrecip\fR and provides the originator pkey
|
||||
\&\fBoriginatorPrivKey\fR and originator certificate \fBoriginator\fR to CMS_ContentInfo.
|
||||
The originator-related fields are relevant only in case when the keyAgreement
|
||||
The originator\-related fields are relevant only in case when the keyAgreement
|
||||
method of providing of the shared key is in use.
|
||||
.PP
|
||||
\&\fBCMS_add1_recipient_cert()\fR adds recipient \fBrecip\fR to CMS_ContentInfo enveloped
|
||||
|
|
@ -175,42 +100,42 @@ values \fBdate\fR, \fBotherTypeId\fR and \fBotherType\fR to CMS_ContentInfo enve
|
|||
data structure \fBcms\fR as a KEKRecipientInfo structure.
|
||||
.PP
|
||||
The CMS_ContentInfo structure should be obtained from an initial call to
|
||||
\&\fBCMS_encrypt()\fR with the flag \fB\s-1CMS_PARTIAL\s0\fR set.
|
||||
.SH "NOTES"
|
||||
\&\fBCMS_encrypt()\fR with the flag \fBCMS_PARTIAL\fR set.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The main purpose of this function is to provide finer control over a \s-1CMS\s0
|
||||
The main purpose of this function is to provide finer control over a CMS
|
||||
enveloped data structure where the simpler \fBCMS_encrypt()\fR function defaults are
|
||||
not appropriate. For example if one or more KEKRecipientInfo structures
|
||||
need to be added. New attributes can also be added using the returned
|
||||
CMS_RecipientInfo structure and the \s-1CMS\s0 attribute utility functions.
|
||||
CMS_RecipientInfo structure and the CMS attribute utility functions.
|
||||
.PP
|
||||
OpenSSL will by default identify recipient certificates using issuer name
|
||||
and serial number. If \fB\s-1CMS_USE_KEYID\s0\fR is set it will use the subject key
|
||||
and serial number. If \fBCMS_USE_KEYID\fR is set it will use the subject key
|
||||
identifier value instead. An error occurs if all recipient certificates do not
|
||||
have a subject key identifier extension.
|
||||
.PP
|
||||
Currently only \s-1AES\s0 based key wrapping algorithms are supported for \fBnid\fR,
|
||||
Currently only AES based key wrapping algorithms are supported for \fBnid\fR,
|
||||
specifically: NID_id_aes128_wrap, NID_id_aes192_wrap and NID_id_aes256_wrap.
|
||||
If \fBnid\fR is set to \fBNID_undef\fR then an \s-1AES\s0 wrap algorithm will be used
|
||||
If \fBnid\fR is set to \fBNID_undef\fR then an AES wrap algorithm will be used
|
||||
consistent with \fBkeylen\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBCMS_add1_recipient_cert()\fR and \fBCMS_add0_recipient_key()\fR return an internal
|
||||
pointer to the CMS_RecipientInfo structure just added or \s-1NULL\s0 if an error
|
||||
pointer to the CMS_RecipientInfo structure just added or NULL if an error
|
||||
occurs.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_decrypt\fR\|(3),
|
||||
\&\fBCMS_final\fR\|(3),
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBCMS_add1_recipient_cert\fR and \fBCMS_add0_recipient_key\fR were added in
|
||||
OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_ADD1_SIGNER 3ossl"
|
||||
.TH CMS_ADD1_SIGNER 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_ADD1_SIGNER 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_add1_signer, CMS_SignerInfo_sign \- add a signer to a CMS_ContentInfo signed data structure
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -151,70 +76,70 @@ CMS_add1_signer, CMS_SignerInfo_sign \- add a signer to a CMS_ContentInfo signed
|
|||
\&
|
||||
\& int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_add1_signer()\fR adds a signer with certificate \fBsigncert\fR and private
|
||||
key \fBpkey\fR using message digest \fBmd\fR to CMS_ContentInfo SignedData
|
||||
structure \fBcms\fR.
|
||||
.PP
|
||||
The CMS_ContentInfo structure should be obtained from an initial call to
|
||||
\&\fBCMS_sign()\fR with the flag \fB\s-1CMS_PARTIAL\s0\fR set or in the case or re-signing a
|
||||
\&\fBCMS_sign()\fR with the flag \fBCMS_PARTIAL\fR set or in the case or re\-signing a
|
||||
valid CMS_ContentInfo SignedData structure.
|
||||
.PP
|
||||
If the \fBmd\fR parameter is \fB\s-1NULL\s0\fR then the default digest for the public
|
||||
If the \fBmd\fR parameter is \fBNULL\fR then the default digest for the public
|
||||
key algorithm will be used.
|
||||
.PP
|
||||
Unless the \fB\s-1CMS_REUSE_DIGEST\s0\fR flag is set the returned CMS_ContentInfo
|
||||
Unless the \fBCMS_REUSE_DIGEST\fR flag is set the returned CMS_ContentInfo
|
||||
structure is not complete and must be finalized either by streaming (if
|
||||
applicable) or a call to \fBCMS_final()\fR.
|
||||
.PP
|
||||
The \fBCMS_SignerInfo_sign()\fR function will explicitly sign a CMS_SignerInfo
|
||||
structure, its main use is when \fB\s-1CMS_REUSE_DIGEST\s0\fR and \fB\s-1CMS_PARTIAL\s0\fR flags
|
||||
The \fBCMS_SignerInfo_sign()\fR function explicitly signs a CMS_SignerInfo
|
||||
structure, its main use is when the \fBCMS_REUSE_DIGEST\fR and \fBCMS_PARTIAL\fR flags
|
||||
are both set.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The main purpose of \fBCMS_add1_signer()\fR is to provide finer control
|
||||
over a \s-1CMS\s0 signed data structure where the simpler \fBCMS_sign()\fR function defaults
|
||||
over a CMS signed data structure where the simpler \fBCMS_sign()\fR function defaults
|
||||
are not appropriate. For example if multiple signers or non default digest
|
||||
algorithms are needed. New attributes can also be added using the returned
|
||||
CMS_SignerInfo structure and the \s-1CMS\s0 attribute utility functions or the
|
||||
\&\s-1CMS\s0 signed receipt request functions.
|
||||
CMS_SignerInfo structure and the CMS attribute utility functions or the
|
||||
CMS signed receipt request functions.
|
||||
.PP
|
||||
Any of the following flags (ored together) can be passed in the \fBflags\fR
|
||||
parameter.
|
||||
.PP
|
||||
If \fB\s-1CMS_REUSE_DIGEST\s0\fR is set then an attempt is made to copy the content
|
||||
If \fBCMS_REUSE_DIGEST\fR is set then an attempt is made to copy the content
|
||||
digest value from the CMS_ContentInfo structure: to add a signer to an existing
|
||||
structure. An error occurs if a matching digest value cannot be found to copy.
|
||||
The returned CMS_ContentInfo structure will be valid and finalized when this
|
||||
flag is set.
|
||||
.PP
|
||||
If \fB\s-1CMS_PARTIAL\s0\fR is set in addition to \fB\s-1CMS_REUSE_DIGEST\s0\fR then the
|
||||
If \fBCMS_PARTIAL\fR is set in addition to \fBCMS_REUSE_DIGEST\fR then the
|
||||
CMS_SignerInfo structure will not be finalized so additional attributes
|
||||
can be added. In this case an explicit call to \fBCMS_SignerInfo_sign()\fR is
|
||||
needed to finalize it.
|
||||
.PP
|
||||
If \fB\s-1CMS_NOCERTS\s0\fR is set the signer's certificate will not be included in the
|
||||
CMS_ContentInfo structure, the signer's certificate must still be supplied in
|
||||
If \fBCMS_NOCERTS\fR is set the signer\*(Aqs certificate will not be included in the
|
||||
CMS_ContentInfo structure, the signer\*(Aqs certificate must still be supplied in
|
||||
the \fBsigncert\fR parameter though. This can reduce the size of the signature if
|
||||
the signers certificate can be obtained by other means: for example a
|
||||
previously signed message.
|
||||
.PP
|
||||
The SignedData structure includes several \s-1CMS\s0 signedAttributes including the
|
||||
signing time, the \s-1CMS\s0 content type and the supported list of ciphers in an
|
||||
SMIMECapabilities attribute. If \fB\s-1CMS_NOATTR\s0\fR is set then no signedAttributes
|
||||
will be used. If \fB\s-1CMS_NOSMIMECAP\s0\fR is set then just the SMIMECapabilities are
|
||||
The SignedData structure includes several CMS signedAttributes including the
|
||||
signing time, the CMS content type and the supported list of ciphers in an
|
||||
SMIMECapabilities attribute. If \fBCMS_NOATTR\fR is set then no signedAttributes
|
||||
will be used. If \fBCMS_NOSMIMECAP\fR is set then just the SMIMECapabilities are
|
||||
omitted.
|
||||
.PP
|
||||
OpenSSL will by default identify signing certificates using issuer name
|
||||
and serial number. If \fB\s-1CMS_USE_KEYID\s0\fR is set it will use the subject key
|
||||
and serial number. If \fBCMS_USE_KEYID\fR is set it will use the subject key
|
||||
identifier value instead. An error occurs if the signing certificate does not
|
||||
have a subject key identifier extension.
|
||||
.PP
|
||||
If present the SMIMECapabilities attribute indicates support for the following
|
||||
algorithms in preference order: 256 bit \s-1AES,\s0 Gost R3411\-94, Gost 28147\-89, 192
|
||||
bit \s-1AES, 128\s0 bit \s-1AES,\s0 triple \s-1DES, 128\s0 bit \s-1RC2, 64\s0 bit \s-1RC2, DES\s0 and 40 bit \s-1RC2.\s0
|
||||
If any of these algorithms is not available then it will not be included: for example the \s-1GOST\s0 algorithms will not be included if the \s-1GOST ENGINE\s0 is
|
||||
algorithms in preference order: 256 bit AES, Gost R3411\-94, Gost 28147\-89, 192
|
||||
bit AES, 128 bit AES, triple DES, 128 bit RC2, 64 bit RC2, DES and 40 bit RC2.
|
||||
If any of these algorithms is not available then it will not be included: for example the GOST algorithms will not be included if the GOST ENGINE is
|
||||
not loaded.
|
||||
.PP
|
||||
\&\fBCMS_add1_signer()\fR returns an internal pointer to the CMS_SignerInfo
|
||||
|
|
@ -223,16 +148,18 @@ before it is finalized.
|
|||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBCMS_add1_signer()\fR returns an internal pointer to the CMS_SignerInfo
|
||||
structure just added or \s-1NULL\s0 if an error occurs.
|
||||
structure just added or NULL if an error occurs.
|
||||
.PP
|
||||
\&\fBCMS_SignerInfo_sign()\fR returns 1 on success, 0 on failure.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_sign\fR\|(3),
|
||||
\&\fBCMS_final\fR\|(3),
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2014\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2014\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,140 +53,81 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_COMPRESS 3ossl"
|
||||
.TH CMS_COMPRESS 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_COMPRESS 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_compress \- create a CMS CompressedData structure
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
\&
|
||||
\& CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_compress()\fR creates and returns a \s-1CMS\s0 CompressedData structure. \fBcomp_nid\fR
|
||||
\&\fBCMS_compress()\fR creates and returns a CMS CompressedData structure. \fBcomp_nid\fR
|
||||
is the compression algorithm to use or \fBNID_undef\fR to use the default
|
||||
algorithm (zlib compression). \fBin\fR is the content to be compressed.
|
||||
\&\fBflags\fR is an optional set of flags.
|
||||
.PP
|
||||
The only currently supported compression algorithm is zlib using the \s-1NID\s0
|
||||
The only currently supported compression algorithm is zlib using the NID
|
||||
NID_zlib_compression.
|
||||
.PP
|
||||
If zlib support is not compiled into OpenSSL then \fBCMS_compress()\fR will return
|
||||
an error.
|
||||
.PP
|
||||
If the \fB\s-1CMS_TEXT\s0\fR flag is set \s-1MIME\s0 headers for type \fBtext/plain\fR are
|
||||
If the \fBCMS_TEXT\fR flag is set MIME headers for type \fBtext/plain\fR are
|
||||
prepended to the data.
|
||||
.PP
|
||||
Normally the supplied content is translated into \s-1MIME\s0 canonical format (as
|
||||
required by the S/MIME specifications) if \fB\s-1CMS_BINARY\s0\fR is set no translation
|
||||
Normally the supplied content is translated into MIME canonical format (as
|
||||
required by the S/MIME specifications) if \fBCMS_BINARY\fR is set no translation
|
||||
occurs. This option should be used if the supplied data is in binary format
|
||||
otherwise the translation will corrupt it. If \fB\s-1CMS_BINARY\s0\fR is set then
|
||||
\&\fB\s-1CMS_TEXT\s0\fR is ignored.
|
||||
otherwise the translation will corrupt it. If \fBCMS_BINARY\fR is set then
|
||||
\&\fBCMS_TEXT\fR is ignored.
|
||||
.PP
|
||||
If the \fB\s-1CMS_STREAM\s0\fR flag is set a partial \fBCMS_ContentInfo\fR structure is
|
||||
returned suitable for streaming I/O: no data is read from the \s-1BIO\s0 \fBin\fR.
|
||||
If the \fBCMS_STREAM\fR flag is set a partial \fBCMS_ContentInfo\fR structure is
|
||||
returned suitable for streaming I/O: no data is read from the BIO \fBin\fR.
|
||||
.PP
|
||||
The compressed data is included in the CMS_ContentInfo structure, unless
|
||||
\&\fB\s-1CMS_DETACHED\s0\fR is set in which case it is omitted. This is rarely used in
|
||||
\&\fBCMS_DETACHED\fR is set in which case it is omitted. This is rarely used in
|
||||
practice and is not supported by \fBSMIME_write_CMS()\fR.
|
||||
.PP
|
||||
If the flag \fB\s-1CMS_STREAM\s0\fR is set the returned \fBCMS_ContentInfo\fR structure is
|
||||
If the flag \fBCMS_STREAM\fR is set the returned \fBCMS_ContentInfo\fR structure is
|
||||
\&\fBnot\fR complete and outputting its contents via a function that does not
|
||||
properly finalize the \fBCMS_ContentInfo\fR structure will give unpredictable
|
||||
results.
|
||||
.PP
|
||||
Several functions including \fBSMIME_write_CMS()\fR, \fBi2d_CMS_bio_stream()\fR,
|
||||
\&\fBPEM_write_bio_CMS_stream()\fR finalize the structure. Alternatively finalization
|
||||
can be performed by obtaining the streaming \s-1ASN1\s0 \fB\s-1BIO\s0\fR directly using
|
||||
can be performed by obtaining the streaming ASN1 \fBBIO\fR directly using
|
||||
\&\fBBIO_new_CMS()\fR.
|
||||
.PP
|
||||
Additional compression parameters such as the zlib compression level cannot
|
||||
currently be set.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBCMS_compress()\fR returns either a CMS_ContentInfo structure or \s-1NULL\s0 if an error
|
||||
\&\fBCMS_compress()\fR returns either a CMS_ContentInfo structure or NULL if an error
|
||||
occurred. The error can be obtained from \fBERR_get_error\fR\|(3).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_uncompress\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fB\s-1CMS_STREAM\s0\fR flag was added in OpenSSL 1.0.0.
|
||||
.SH "COPYRIGHT"
|
||||
The \fBCMS_STREAM\fR flag was added in OpenSSL 1.0.0.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_DATA_CREATE 3ossl"
|
||||
.TH CMS_DATA_CREATE 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_DATA_CREATE 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_data_create_ex, CMS_data_create
|
||||
\&\- Create CMS Data object
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -150,36 +75,36 @@ CMS_data_create_ex, CMS_data_create
|
|||
\& OSSL_LIB_CTX *libctx, const char *propq);
|
||||
\& CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_data_create_ex()\fR creates a \fBCMS_ContentInfo\fR structure
|
||||
with a type \fBNID_pkcs7_data\fR. The data is supplied via the \fIin\fR \s-1BIO.\s0
|
||||
with a type \fBNID_pkcs7_data\fR. The data is supplied via the \fIin\fR BIO.
|
||||
The library context \fIlibctx\fR and the property query \fIpropq\fR are used when
|
||||
retrieving algorithms from providers. The \fIflags\fR field supports the
|
||||
\&\fB\s-1CMS_STREAM\s0\fR flag. Internally \fBCMS_final()\fR is called unless \fB\s-1CMS_STREAM\s0\fR is
|
||||
\&\fBCMS_STREAM\fR flag. Internally \fBCMS_final()\fR is called unless \fBCMS_STREAM\fR is
|
||||
specified.
|
||||
.PP
|
||||
The \fBCMS_ContentInfo\fR structure can be freed using \fBCMS_ContentInfo_free\fR\|(3).
|
||||
.PP
|
||||
\&\fBCMS_data_create()\fR is similar to \fBCMS_data_create_ex()\fR
|
||||
but uses default values of \s-1NULL\s0 for the library context \fIlibctx\fR and the
|
||||
but uses default values of NULL for the library context \fIlibctx\fR and the
|
||||
property query \fIpropq\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
If the allocation fails, \fBCMS_data_create_ex()\fR and \fBCMS_data_create()\fR
|
||||
return \s-1NULL\s0 and set an error code that can be obtained by \fBERR_get_error\fR\|(3).
|
||||
return NULL and set an error code that can be obtained by \fBERR_get_error\fR\|(3).
|
||||
Otherwise they return a pointer to the newly allocated structure.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_final\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBCMS_data_create_ex()\fR method was added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2020\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_DECRYPT 3ossl"
|
||||
.TH CMS_DECRYPT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_DECRYPT 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_decrypt, CMS_decrypt_set1_pkey_and_peer,
|
||||
CMS_decrypt_set1_pkey, CMS_decrypt_set1_password
|
||||
\&\- decrypt content from a CMS envelopedData structure
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -155,52 +80,52 @@ CMS_decrypt_set1_pkey, CMS_decrypt_set1_password
|
|||
\& int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
|
||||
\& unsigned char *pass, ossl_ssize_t passlen);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_decrypt()\fR extracts the decrypted content from a \s-1CMS\s0 EnvelopedData
|
||||
\&\fBCMS_decrypt()\fR extracts the decrypted content from a CMS EnvelopedData
|
||||
or AuthEnvelopedData structure.
|
||||
It uses \fBCMS_decrypt_set1_pkey()\fR to decrypt the content
|
||||
with the recipient private key \fIpkey\fR if \fIpkey\fR is not \s-1NULL.\s0
|
||||
with the recipient private key \fIpkey\fR if \fIpkey\fR is not NULL.
|
||||
In this case, it is recommended to provide the associated certificate
|
||||
in \fIcert\fR \- see the \s-1NOTES\s0 below.
|
||||
\&\fIout\fR is a \s-1BIO\s0 to write the content to and
|
||||
in \fIcert\fR \- see the NOTES below.
|
||||
\&\fIout\fR is a BIO to write the content to and
|
||||
\&\fIflags\fR is an optional set of flags.
|
||||
If \fIpkey\fR is \s-1NULL\s0 the function assumes that decryption was already done
|
||||
If \fIpkey\fR is NULL the function assumes that decryption was already done
|
||||
(e.g., using \fBCMS_decrypt_set1_pkey()\fR or \fBCMS_decrypt_set1_password()\fR) and just
|
||||
provides the content unless \fIcert\fR, \fIdcont\fR, and \fIout\fR are \s-1NULL\s0 as well.
|
||||
provides the content unless \fIcert\fR, \fIdcont\fR, and \fIout\fR are NULL as well.
|
||||
The \fIdcont\fR parameter is used in the rare case where the encrypted content
|
||||
is detached. It will normally be set to \s-1NULL.\s0
|
||||
is detached. It will normally be set to NULL.
|
||||
.PP
|
||||
\&\fBCMS_decrypt_set1_pkey_and_peer()\fR decrypts the CMS_ContentInfo structure \fIcms\fR
|
||||
using the private key \fIpkey\fR, the corresponding certificate \fIcert\fR, which is
|
||||
recommended to be supplied but may be \s-1NULL,\s0
|
||||
recommended to be supplied but may be NULL,
|
||||
and the (optional) originator certificate \fIpeer\fR.
|
||||
On success, it also records in \fIcms\fR the decryption key \fIpkey\fR, and this
|
||||
should be followed by \f(CW\*(C`CMS_decrypt(cms, NULL, NULL, dcont, out, flags)\*(C'\fR.
|
||||
This call deallocates any decryption key stored in \fIcms\fR.
|
||||
.PP
|
||||
\&\fBCMS_decrypt_set1_pkey()\fR is the same as
|
||||
\&\fBCMS_decrypt_set1_pkey_and_peer()\fR with \fIpeer\fR being \s-1NULL.\s0
|
||||
\&\fBCMS_decrypt_set1_pkey_and_peer()\fR with \fIpeer\fR being NULL.
|
||||
.PP
|
||||
\&\fBCMS_decrypt_set1_password()\fR decrypts the CMS_ContentInfo structure \fIcms\fR
|
||||
using the secret \fIpass\fR of length \fIpasslen\fR.
|
||||
On success, it also records in \fIcms\fR the decryption key used, and this
|
||||
should be followed by \f(CW\*(C`CMS_decrypt(cms, NULL, NULL, dcont, out, flags)\*(C'\fR.
|
||||
This call deallocates any decryption key stored in \fIcms\fR.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Although the recipients certificate is not needed to decrypt the data it is
|
||||
needed to locate the appropriate (of possible several) recipients in the \s-1CMS\s0
|
||||
needed to locate the appropriate (of possible several) recipients in the CMS
|
||||
structure.
|
||||
.PP
|
||||
If \fIcert\fR is set to \s-1NULL\s0 all possible recipients are tried. This case however
|
||||
is problematic. To thwart the \s-1MMA\s0 attack (Bleichenbacher's attack on
|
||||
\&\s-1PKCS\s0 #1 v1.5 \s-1RSA\s0 padding) all recipients are tried whether they succeed or
|
||||
If \fIcert\fR is set to NULL all possible recipients are tried. This case however
|
||||
is problematic. To thwart the MMA attack (Bleichenbacher\*(Aqs attack on
|
||||
PKCS #1 v1.5 RSA padding) all recipients are tried whether they succeed or
|
||||
not. If no recipient succeeds then a random symmetric key is used to decrypt
|
||||
the content: this will typically output garbage and may (but is not guaranteed
|
||||
to) ultimately return a padding error only. If \fBCMS_decrypt()\fR just returned an
|
||||
error when all recipient encrypted keys failed to decrypt an attacker could
|
||||
use this in a timing attack. If the special flag \fB\s-1CMS_DEBUG_DECRYPT\s0\fR is set
|
||||
use this in a timing attack. If the special flag \fBCMS_DEBUG_DECRYPT\fR is set
|
||||
then the above behaviour is modified and an error \fBis\fR returned if no
|
||||
recipient encrypted key can be decrypted \fBwithout\fR generating a random
|
||||
content encryption key. Applications should use this flag with
|
||||
|
|
@ -208,18 +133,18 @@ content encryption key. Applications should use this flag with
|
|||
open to attack.
|
||||
.PP
|
||||
It is possible to determine the correct recipient key by other means (for
|
||||
example looking them up in a database) and setting them in the \s-1CMS\s0 structure
|
||||
in advance using the \s-1CMS\s0 utility functions such as \fBCMS_set1_pkey()\fR,
|
||||
example looking them up in a database) and setting them in the CMS structure
|
||||
in advance using the CMS utility functions such as \fBCMS_set1_pkey()\fR,
|
||||
or use \fBCMS_decrypt_set1_password()\fR if the recipient has a symmetric key.
|
||||
In these cases both \fIcert\fR and \fIpkey\fR should be set to \s-1NULL.\s0
|
||||
In these cases both \fIcert\fR and \fIpkey\fR should be set to NULL.
|
||||
.PP
|
||||
To process KEKRecipientInfo types \fBCMS_set1_key()\fR or \fBCMS_RecipientInfo_set0_key()\fR
|
||||
and \fBCMS_RecipientInfo_decrypt()\fR should be called before \fBCMS_decrypt()\fR and
|
||||
\&\fIcert\fR and \fIpkey\fR set to \s-1NULL.\s0
|
||||
\&\fIcert\fR and \fIpkey\fR set to NULL.
|
||||
.PP
|
||||
The following flags can be passed in the \fIflags\fR parameter.
|
||||
.PP
|
||||
If the \fB\s-1CMS_TEXT\s0\fR flag is set \s-1MIME\s0 headers for type \f(CW\*(C`text/plain\*(C'\fR are deleted
|
||||
If the \fBCMS_TEXT\fR flag is set MIME headers for type \f(CW\*(C`text/plain\*(C'\fR are deleted
|
||||
from the content. If the content is not of type \f(CW\*(C`text/plain\*(C'\fR then an error is
|
||||
returned.
|
||||
.SH "RETURN VALUES"
|
||||
|
|
@ -228,7 +153,7 @@ returned.
|
|||
\&\fBCMS_decrypt_set1_pkey()\fR, and \fBCMS_decrypt_set1_password()\fR
|
||||
return either 1 for success or 0 for failure.
|
||||
The error can be obtained from \fBERR_get_error\fR\|(3).
|
||||
.SH "BUGS"
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
The \fBset1_\fR part of these function names is misleading
|
||||
and should better read: \fBwith_\fR.
|
||||
|
|
@ -238,15 +163,15 @@ mentioned in \fBCMS_verify()\fR also applies to \fBCMS_decrypt()\fR.
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_encrypt\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBCMS_decrypt_set1_pkey_and_peer()\fR and \fBCMS_decrypt_set1_password()\fR
|
||||
were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,79 +53,20 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_DIGEST_CREATE 3ossl"
|
||||
.TH CMS_DIGEST_CREATE 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_DIGEST_CREATE 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_digest_create_ex, CMS_digest_create
|
||||
\&\- Create CMS DigestedData object
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -153,36 +78,36 @@ CMS_digest_create_ex, CMS_digest_create
|
|||
\& CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
|
||||
\& unsigned int flags);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_digest_create_ex()\fR creates a \fBCMS_ContentInfo\fR structure
|
||||
with a type \fBNID_pkcs7_digest\fR. The data supplied via the \fIin\fR \s-1BIO\s0 is digested
|
||||
with a type \fBNID_pkcs7_digest\fR. The data supplied via the \fIin\fR BIO is digested
|
||||
using \fImd\fR. The library context \fIlibctx\fR and the property query \fIpropq\fR are
|
||||
used when retrieving algorithms from providers.
|
||||
The \fIflags\fR field supports the \fB\s-1CMS_DETACHED\s0\fR and \fB\s-1CMS_STREAM\s0\fR flags,
|
||||
Internally \fBCMS_final()\fR is called unless \fB\s-1CMS_STREAM\s0\fR is specified.
|
||||
The \fIflags\fR field supports the \fBCMS_DETACHED\fR and \fBCMS_STREAM\fR flags,
|
||||
Internally \fBCMS_final()\fR is called unless \fBCMS_STREAM\fR is specified.
|
||||
.PP
|
||||
The \fBCMS_ContentInfo\fR structure can be freed using \fBCMS_ContentInfo_free\fR\|(3).
|
||||
.PP
|
||||
\&\fBCMS_digest_create()\fR is similar to \fBCMS_digest_create_ex()\fR
|
||||
but uses default values of \s-1NULL\s0 for the library context \fIlibctx\fR and the
|
||||
but uses default values of NULL for the library context \fIlibctx\fR and the
|
||||
property query \fIpropq\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
If the allocation fails, \fBCMS_digest_create_ex()\fR and \fBCMS_digest_create()\fR
|
||||
return \s-1NULL\s0 and set an error code that can be obtained by \fBERR_get_error\fR\|(3).
|
||||
return NULL and set an error code that can be obtained by \fBERR_get_error\fR\|(3).
|
||||
Otherwise they return a pointer to the newly allocated structure.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_final\fR\|(3)>
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The \fBCMS_digest_create_ex()\fR method was added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2020\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_ENCRYPT 3ossl"
|
||||
.TH CMS_ENCRYPT 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_ENCRYPT 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_encrypt_ex, CMS_encrypt \- create a CMS envelopedData structure
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -151,95 +76,95 @@ CMS_encrypt_ex, CMS_encrypt \- create a CMS envelopedData structure
|
|||
\& CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
||||
\& const EVP_CIPHER *cipher, unsigned int flags);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_encrypt_ex()\fR creates and returns a \s-1CMS\s0 EnvelopedData or
|
||||
\&\fBCMS_encrypt_ex()\fR creates and returns a CMS EnvelopedData or
|
||||
AuthEnvelopedData structure. \fIcerts\fR is a list of recipient certificates.
|
||||
\&\fIin\fR is the content to be encrypted. \fIcipher\fR is the symmetric cipher to use.
|
||||
\&\fIflags\fR is an optional set of flags. The library context \fIlibctx\fR and the
|
||||
property query \fIpropq\fR are used internally when retrieving algorithms from
|
||||
providers.
|
||||
.PP
|
||||
Only certificates carrying \s-1RSA,\s0 Diffie-Hellman or \s-1EC\s0 keys are supported by this
|
||||
Only certificates carrying RSA, Diffie\-Hellman or EC keys are supported by this
|
||||
function.
|
||||
.PP
|
||||
\&\fBEVP_des_ede3_cbc()\fR (triple \s-1DES\s0) is the algorithm of choice for S/MIME use
|
||||
\&\fBEVP_des_ede3_cbc()\fR (triple DES) is the algorithm of choice for S/MIME use
|
||||
because most clients will support it.
|
||||
.PP
|
||||
The algorithm passed in the \fBcipher\fR parameter must support \s-1ASN1\s0 encoding of
|
||||
its parameters. If the cipher mode is \s-1GCM,\s0 then an AuthEnvelopedData structure
|
||||
containing \s-1MAC\s0 is used. Otherwise an EnvelopedData structure is used. Currently
|
||||
the \s-1AES\s0 variants with \s-1GCM\s0 mode are the only supported \s-1AEAD\s0 algorithms.
|
||||
The algorithm passed in the \fBcipher\fR parameter must support ASN1 encoding of
|
||||
its parameters. If the cipher mode is GCM, then an AuthEnvelopedData structure
|
||||
containing MAC is used. Otherwise an EnvelopedData structure is used. Currently
|
||||
the AES variants with GCM mode are the only supported AEAD algorithms.
|
||||
.PP
|
||||
Many browsers implement a \*(L"sign and encrypt\*(R" option which is simply an S/MIME
|
||||
Many browsers implement a "sign and encrypt" option which is simply an S/MIME
|
||||
envelopedData containing an S/MIME signed message. This can be readily produced
|
||||
by storing the S/MIME signed message in a memory \s-1BIO\s0 and passing it to
|
||||
by storing the S/MIME signed message in a memory BIO and passing it to
|
||||
\&\fBCMS_encrypt()\fR.
|
||||
.PP
|
||||
The following flags can be passed in the \fBflags\fR parameter.
|
||||
.PP
|
||||
If the \fB\s-1CMS_TEXT\s0\fR flag is set \s-1MIME\s0 headers for type \fBtext/plain\fR are
|
||||
If the \fBCMS_TEXT\fR flag is set MIME headers for type \fBtext/plain\fR are
|
||||
prepended to the data.
|
||||
.PP
|
||||
Normally the supplied content is translated into \s-1MIME\s0 canonical format (as
|
||||
required by the S/MIME specifications) if \fB\s-1CMS_BINARY\s0\fR is set no translation
|
||||
Normally the supplied content is translated into MIME canonical format (as
|
||||
required by the S/MIME specifications) if \fBCMS_BINARY\fR is set no translation
|
||||
occurs. This option should be used if the supplied data is in binary format
|
||||
otherwise the translation will corrupt it. If \fB\s-1CMS_BINARY\s0\fR is set then
|
||||
\&\fB\s-1CMS_TEXT\s0\fR is ignored.
|
||||
otherwise the translation will corrupt it. If \fBCMS_BINARY\fR is set then
|
||||
\&\fBCMS_TEXT\fR is ignored.
|
||||
.PP
|
||||
OpenSSL will by default identify recipient certificates using issuer name
|
||||
and serial number. If \fB\s-1CMS_USE_KEYID\s0\fR is set it will use the subject key
|
||||
and serial number. If \fBCMS_USE_KEYID\fR is set it will use the subject key
|
||||
identifier value instead. An error occurs if all recipient certificates do not
|
||||
have a subject key identifier extension.
|
||||
.PP
|
||||
If the \fB\s-1CMS_STREAM\s0\fR flag is set a partial \fBCMS_ContentInfo\fR structure is
|
||||
returned suitable for streaming I/O: no data is read from the \s-1BIO\s0 \fBin\fR.
|
||||
If the \fBCMS_STREAM\fR flag is set a partial \fBCMS_ContentInfo\fR structure is
|
||||
returned suitable for streaming I/O: no data is read from the BIO \fBin\fR.
|
||||
.PP
|
||||
If the \fB\s-1CMS_PARTIAL\s0\fR flag is set a partial \fBCMS_ContentInfo\fR structure is
|
||||
If the \fBCMS_PARTIAL\fR flag is set a partial \fBCMS_ContentInfo\fR structure is
|
||||
returned to which additional recipients and attributes can be added before
|
||||
finalization.
|
||||
.PP
|
||||
The data being encrypted is included in the CMS_ContentInfo structure, unless
|
||||
\&\fB\s-1CMS_DETACHED\s0\fR is set in which case it is omitted. This is rarely used in
|
||||
\&\fBCMS_DETACHED\fR is set in which case it is omitted. This is rarely used in
|
||||
practice and is not supported by \fBSMIME_write_CMS()\fR.
|
||||
.PP
|
||||
If the flag \fB\s-1CMS_STREAM\s0\fR is set the returned \fBCMS_ContentInfo\fR structure is
|
||||
If the flag \fBCMS_STREAM\fR is set the returned \fBCMS_ContentInfo\fR structure is
|
||||
\&\fBnot\fR complete and outputting its contents via a function that does not
|
||||
properly finalize the \fBCMS_ContentInfo\fR structure will give unpredictable
|
||||
results.
|
||||
.PP
|
||||
Several functions including \fBSMIME_write_CMS()\fR, \fBi2d_CMS_bio_stream()\fR,
|
||||
\&\fBPEM_write_bio_CMS_stream()\fR finalize the structure. Alternatively finalization
|
||||
can be performed by obtaining the streaming \s-1ASN1\s0 \fB\s-1BIO\s0\fR directly using
|
||||
can be performed by obtaining the streaming ASN1 \fBBIO\fR directly using
|
||||
\&\fBBIO_new_CMS()\fR.
|
||||
.PP
|
||||
The recipients specified in \fBcerts\fR use a \s-1CMS\s0 KeyTransRecipientInfo info
|
||||
structure. KEKRecipientInfo is also supported using the flag \fB\s-1CMS_PARTIAL\s0\fR
|
||||
The recipients specified in \fBcerts\fR use a CMS KeyTransRecipientInfo info
|
||||
structure. KEKRecipientInfo is also supported using the flag \fBCMS_PARTIAL\fR
|
||||
and \fBCMS_add0_recipient_key()\fR.
|
||||
.PP
|
||||
The parameter \fBcerts\fR may be \s-1NULL\s0 if \fB\s-1CMS_PARTIAL\s0\fR is set and recipients
|
||||
The parameter \fBcerts\fR may be NULL if \fBCMS_PARTIAL\fR is set and recipients
|
||||
added later using \fBCMS_add1_recipient_cert()\fR or \fBCMS_add0_recipient_key()\fR.
|
||||
.PP
|
||||
\&\fBCMS_encrypt()\fR is similar to \fBCMS_encrypt_ex()\fR but uses default values
|
||||
of \s-1NULL\s0 for the library context \fIlibctx\fR and the property query \fIpropq\fR.
|
||||
of NULL for the library context \fIlibctx\fR and the property query \fIpropq\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBCMS_encrypt_ex()\fR and \fBCMS_encrypt()\fR return either a CMS_ContentInfo
|
||||
structure or \s-1NULL\s0 if an error occurred. The error can be obtained from
|
||||
structure or NULL if an error occurred. The error can be obtained from
|
||||
\&\fBERR_get_error\fR\|(3).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_decrypt\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The function \fBCMS_encrypt_ex()\fR was added in OpenSSL 3.0.
|
||||
.PP
|
||||
The \fB\s-1CMS_STREAM\s0\fR flag was first supported in OpenSSL 1.0.0.
|
||||
.SH "COPYRIGHT"
|
||||
The \fBCMS_STREAM\fR flag was first supported in OpenSSL 1.0.0.
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,95 +53,36 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_FINAL 3ossl"
|
||||
.TH CMS_FINAL 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_FINAL 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_final \- finalise a CMS_ContentInfo structure
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
\&
|
||||
\& int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_final()\fR finalises the structure \fBcms\fR. Its purpose is to perform any
|
||||
operations necessary on \fBcms\fR (digest computation for example) and set the
|
||||
appropriate fields. The parameter \fBdata\fR contains the content to be
|
||||
processed. The \fBdcont\fR parameter contains a \s-1BIO\s0 to write content to after
|
||||
processed. The \fBdcont\fR parameter contains a BIO to write content to after
|
||||
processing: this is only used with detached data and will usually be set to
|
||||
\&\s-1NULL.\s0
|
||||
.SH "NOTES"
|
||||
NULL.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
This function will normally be called when the \fB\s-1CMS_PARTIAL\s0\fR flag is used. It
|
||||
This function will normally be called when the \fBCMS_PARTIAL\fR flag is used. It
|
||||
should only be used when streaming is not performed because the streaming
|
||||
I/O functions perform finalisation operations internally.
|
||||
.SH "RETURN VALUES"
|
||||
|
|
@ -167,11 +92,11 @@ I/O functions perform finalisation operations internally.
|
|||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_sign\fR\|(3),
|
||||
\&\fBCMS_encrypt\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,76 +53,17 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_GET0_RECIPIENTINFOS 3ossl"
|
||||
.TH CMS_GET0_RECIPIENTINFOS 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_GET0_RECIPIENTINFOS 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_get0_RecipientInfos, CMS_RecipientInfo_type,
|
||||
CMS_RecipientInfo_ktri_get0_signer_id, CMS_RecipientInfo_ktri_cert_cmp,
|
||||
CMS_RecipientInfo_set0_pkey, CMS_RecipientInfo_kekri_get0_id,
|
||||
|
|
@ -147,7 +72,7 @@ CMS_RecipientInfo_kari_set0_pkey,
|
|||
CMS_RecipientInfo_kekri_id_cmp, CMS_RecipientInfo_set0_key,
|
||||
CMS_RecipientInfo_decrypt, CMS_RecipientInfo_encrypt
|
||||
\&\- CMS envelopedData RecipientInfo routines
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -177,53 +102,53 @@ CMS_RecipientInfo_decrypt, CMS_RecipientInfo_encrypt
|
|||
\& int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
\& int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The function \fBCMS_get0_RecipientInfos()\fR returns all the CMS_RecipientInfo
|
||||
structures associated with a \s-1CMS\s0 EnvelopedData structure.
|
||||
structures associated with a CMS EnvelopedData structure.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_type()\fR returns the type of CMS_RecipientInfo structure \fBri\fR.
|
||||
It will currently return \s-1CMS_RECIPINFO_TRANS, CMS_RECIPINFO_AGREE,
|
||||
CMS_RECIPINFO_KEK, CMS_RECIPINFO_PASS,\s0 or \s-1CMS_RECIPINFO_OTHER.\s0
|
||||
It will currently return CMS_RECIPINFO_TRANS, CMS_RECIPINFO_AGREE,
|
||||
CMS_RECIPINFO_KEK, CMS_RECIPINFO_PASS, or CMS_RECIPINFO_OTHER.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_ktri_get0_signer_id()\fR retrieves the certificate recipient
|
||||
identifier associated with a specific CMS_RecipientInfo structure \fBri\fR, which
|
||||
must be of type \s-1CMS_RECIPINFO_TRANS.\s0 Either the keyidentifier will be set in
|
||||
must be of type CMS_RECIPINFO_TRANS. Either the keyidentifier will be set in
|
||||
\&\fBkeyid\fR or \fBboth\fR issuer name and serial number in \fBissuer\fR and \fBsno\fR.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_ktri_cert_cmp()\fR compares the certificate \fBcert\fR against the
|
||||
CMS_RecipientInfo structure \fBri\fR, which must be of type \s-1CMS_RECIPINFO_TRANS.\s0
|
||||
CMS_RecipientInfo structure \fBri\fR, which must be of type CMS_RECIPINFO_TRANS.
|
||||
It returns zero if the comparison is successful and non zero if not.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_set0_pkey()\fR associates the private key \fBpkey\fR with
|
||||
the CMS_RecipientInfo structure \fBri\fR, which must be of type
|
||||
\&\s-1CMS_RECIPINFO_TRANS.\s0
|
||||
CMS_RECIPINFO_TRANS.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_kari_set0_pkey_and_peer()\fR associates the private key \fBpkey\fR
|
||||
and peer certificate \fBpeer\fR with the CMS_RecipientInfo structure \fBri\fR, which
|
||||
must be of type \s-1CMS_RECIPINFO_AGREE.\s0
|
||||
must be of type CMS_RECIPINFO_AGREE.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_kari_set0_pkey()\fR associates the private key \fBpkey\fR with the
|
||||
CMS_RecipientInfo structure \fBri\fR, which must be of type \s-1CMS_RECIPINFO_AGREE.\s0
|
||||
CMS_RecipientInfo structure \fBri\fR, which must be of type CMS_RECIPINFO_AGREE.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_kekri_get0_id()\fR retrieves the key information from the
|
||||
CMS_RecipientInfo structure \fBri\fR which must be of type \s-1CMS_RECIPINFO_KEK.\s0 Any
|
||||
of the remaining parameters can be \s-1NULL\s0 if the application is not interested in
|
||||
the value of a field. Where a field is optional and absent \s-1NULL\s0 will be written
|
||||
CMS_RecipientInfo structure \fBri\fR which must be of type CMS_RECIPINFO_KEK. Any
|
||||
of the remaining parameters can be NULL if the application is not interested in
|
||||
the value of a field. Where a field is optional and absent NULL will be written
|
||||
to the corresponding parameter. The keyEncryptionAlgorithm field is written to
|
||||
\&\fBpalg\fR, the \fBkeyIdentifier\fR field is written to \fBpid\fR, the \fBdate\fR field if
|
||||
present is written to \fBpdate\fR, if the \fBother\fR field is present the components
|
||||
\&\fBkeyAttrId\fR and \fBkeyAttr\fR are written to parameters \fBpotherid\fR and
|
||||
\&\fBpothertype\fR.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_kekri_id_cmp()\fR compares the \s-1ID\s0 in the \fBid\fR and \fBidlen\fR
|
||||
\&\fBCMS_RecipientInfo_kekri_id_cmp()\fR compares the ID in the \fBid\fR and \fBidlen\fR
|
||||
parameters against the \fBkeyIdentifier\fR CMS_RecipientInfo structure \fBri\fR,
|
||||
which must be of type \s-1CMS_RECIPINFO_KEK.\s0 It returns zero if the comparison is
|
||||
which must be of type CMS_RECIPINFO_KEK. It returns zero if the comparison is
|
||||
successful and non zero if not.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_set0_key()\fR associates the symmetric key \fBkey\fR of length
|
||||
\&\fBkeylen\fR with the CMS_RecipientInfo structure \fBri\fR, which must be of type
|
||||
\&\s-1CMS_RECIPINFO_KEK.\s0
|
||||
CMS_RECIPINFO_KEK.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_decrypt()\fR attempts to decrypt CMS_RecipientInfo structure
|
||||
\&\fBri\fR in structure \fBcms\fR. A key must have been associated with the structure
|
||||
|
|
@ -233,7 +158,7 @@ first.
|
|||
\&\fBri\fR in structure \fBcms\fR. A key must have been associated with the structure
|
||||
first and the content encryption key must be available: for example by a
|
||||
previous call to \fBCMS_RecipientInfo_decrypt()\fR.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The main purpose of these functions is to enable an application to lookup
|
||||
recipient keys using any appropriate technique when the simpler method
|
||||
|
|
@ -246,7 +171,7 @@ can be ignored or its key identifier data retrieved using an appropriate
|
|||
function. Then if the corresponding secret or private key can be obtained by
|
||||
any appropriate means it can then associated with the structure and
|
||||
\&\fBCMS_RecipientInfo_decrypt()\fR called. If successful \fBCMS_decrypt()\fR can be called
|
||||
with a \s-1NULL\s0 key to decrypt the enveloped content.
|
||||
with a NULL key to decrypt the enveloped content.
|
||||
.PP
|
||||
The \fBCMS_RecipientInfo_encrypt()\fR can be used to add a new recipient to an
|
||||
existing enveloped data structure. Typically an application will first decrypt
|
||||
|
|
@ -256,7 +181,7 @@ available, it will then add a new recipient using a function such as
|
|||
using \fBCMS_RecipientInfo_encrypt()\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBCMS_get0_RecipientInfos()\fR returns all CMS_RecipientInfo structures, or \s-1NULL\s0 if
|
||||
\&\fBCMS_get0_RecipientInfos()\fR returns all CMS_RecipientInfo structures, or NULL if
|
||||
an error occurs.
|
||||
.PP
|
||||
\&\fBCMS_RecipientInfo_ktri_get0_signer_id()\fR, \fBCMS_RecipientInfo_set0_pkey()\fR,
|
||||
|
|
@ -271,15 +196,15 @@ Any error can be obtained from \fBERR_get_error\fR\|(3).
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_decrypt\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBCMS_RecipientInfo_kari_set0_pkey_and_peer\fR and \fBCMS_RecipientInfo_kari_set0_pkey\fR
|
||||
were added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,81 +53,22 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_GET0_SIGNERINFOS 3ossl"
|
||||
.TH CMS_GET0_SIGNERINFOS 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_GET0_SIGNERINFOS 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_SignerInfo_set1_signer_cert,
|
||||
CMS_get0_SignerInfos, CMS_SignerInfo_get0_signer_id,
|
||||
CMS_SignerInfo_get0_signature, CMS_SignerInfo_cert_cmp
|
||||
\&\- CMS signedData signer functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -156,10 +81,10 @@ CMS_SignerInfo_get0_signature, CMS_SignerInfo_cert_cmp
|
|||
\& int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
||||
\& void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The function \fBCMS_get0_SignerInfos()\fR returns all the CMS_SignerInfo structures
|
||||
associated with a \s-1CMS\s0 signedData structure.
|
||||
associated with a CMS signedData structure.
|
||||
.PP
|
||||
\&\fBCMS_SignerInfo_get0_signer_id()\fR retrieves the certificate signer identifier
|
||||
associated with a specific CMS_SignerInfo structure \fBsi\fR. Either the
|
||||
|
|
@ -167,7 +92,7 @@ keyidentifier will be set in \fBkeyid\fR or \fBboth\fR issuer name and serial nu
|
|||
in \fBissuer\fR and \fBsno\fR.
|
||||
.PP
|
||||
\&\fBCMS_SignerInfo_get0_signature()\fR retrieves the signature associated with
|
||||
\&\fBsi\fR in a pointer to an \s-1ASN1_OCTET_STRING\s0 structure. This pointer returned
|
||||
\&\fBsi\fR in a pointer to an ASN1_OCTET_STRING structure. This pointer returned
|
||||
corresponds to the internal signature value if \fBsi\fR so it may be read or
|
||||
modified.
|
||||
.PP
|
||||
|
|
@ -177,7 +102,7 @@ if not.
|
|||
.PP
|
||||
\&\fBCMS_SignerInfo_set1_signer_cert()\fR sets the signers certificate of \fBsi\fR to
|
||||
\&\fBsigner\fR.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The main purpose of these functions is to enable an application to lookup
|
||||
signers certificates using any appropriate technique when the simpler method
|
||||
|
|
@ -185,19 +110,19 @@ of \fBCMS_verify()\fR is not appropriate.
|
|||
.PP
|
||||
In typical usage and application will retrieve all CMS_SignerInfo structures
|
||||
using \fBCMS_get0_SignerInfo()\fR and retrieve the identifier information using
|
||||
\&\s-1CMS.\s0 It will then obtain the signer certificate by some unspecified means
|
||||
CMS. It will then obtain the signer certificate by some unspecified means
|
||||
(or return and error if it cannot be found) and set it using
|
||||
\&\fBCMS_SignerInfo_set1_signer_cert()\fR.
|
||||
.PP
|
||||
Once all signer certificates have been set \fBCMS_verify()\fR can be used.
|
||||
.PP
|
||||
Although \fBCMS_get0_SignerInfos()\fR can return \s-1NULL\s0 if an error occurs \fBor\fR if
|
||||
Although \fBCMS_get0_SignerInfos()\fR can return NULL if an error occurs \fBor\fR if
|
||||
there are no signers this is not a problem in practice because the only
|
||||
error which can occur is if the \fBcms\fR structure is not of type signedData
|
||||
due to application error.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBCMS_get0_SignerInfos()\fR returns all CMS_SignerInfo structures, or \s-1NULL\s0 there
|
||||
\&\fBCMS_get0_SignerInfos()\fR returns all CMS_SignerInfo structures, or NULL there
|
||||
are no signers or an error occurs.
|
||||
.PP
|
||||
\&\fBCMS_SignerInfo_get0_signer_id()\fR returns 1 for success and 0 for failure.
|
||||
|
|
@ -211,11 +136,11 @@ Any error can be obtained from \fBERR_get_error\fR\|(3)
|
|||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3), \fBCMS_verify\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,78 +53,19 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_GET0_TYPE 3ossl"
|
||||
.TH CMS_GET0_TYPE 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_GET0_TYPE 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_get0_type, CMS_set1_eContentType, CMS_get0_eContentType, CMS_get0_content \- get and set CMS content types and content
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -150,32 +75,32 @@ CMS_get0_type, CMS_set1_eContentType, CMS_get0_eContentType, CMS_get0_content \-
|
|||
\& const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
|
||||
\& ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_get0_type()\fR returns the content type of a CMS_ContentInfo structure as
|
||||
an \s-1ASN1_OBJECT\s0 pointer. An application can then decide how to process the
|
||||
an ASN1_OBJECT pointer. An application can then decide how to process the
|
||||
CMS_ContentInfo structure based on this value.
|
||||
.PP
|
||||
\&\fBCMS_set1_eContentType()\fR sets the embedded content type of a CMS_ContentInfo
|
||||
structure. It should be called with \s-1CMS\s0 functions (such as \fBCMS_sign\fR\|(3),
|
||||
structure. It should be called with CMS functions (such as \fBCMS_sign\fR\|(3),
|
||||
\&\fBCMS_encrypt\fR\|(3))
|
||||
with the \fB\s-1CMS_PARTIAL\s0\fR
|
||||
with the \fBCMS_PARTIAL\fR
|
||||
flag and \fBbefore\fR the structure is finalised, otherwise the results are
|
||||
undefined.
|
||||
.PP
|
||||
\&\s-1ASN1_OBJECT\s0 *\fBCMS_get0_eContentType()\fR returns a pointer to the embedded
|
||||
ASN1_OBJECT *\fBCMS_get0_eContentType()\fR returns a pointer to the embedded
|
||||
content type.
|
||||
.PP
|
||||
\&\fBCMS_get0_content()\fR returns a pointer to the \fB\s-1ASN1_OCTET_STRING\s0\fR pointer
|
||||
\&\fBCMS_get0_content()\fR returns a pointer to the \fBASN1_OCTET_STRING\fR pointer
|
||||
containing the embedded content.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
As the \fB0\fR implies \fBCMS_get0_type()\fR, \fBCMS_get0_eContentType()\fR and
|
||||
\&\fBCMS_get0_content()\fR return internal pointers which should \fBnot\fR be freed up.
|
||||
\&\fBCMS_set1_eContentType()\fR copies the supplied \s-1OID\s0 and it \fBshould\fR be freed up
|
||||
\&\fBCMS_set1_eContentType()\fR copies the supplied OID and it \fBshould\fR be freed up
|
||||
after use.
|
||||
.PP
|
||||
The \fB\s-1ASN1_OBJECT\s0\fR values returned can be converted to an integer \fB\s-1NID\s0\fR value
|
||||
The \fBASN1_OBJECT\fR values returned can be converted to an integer \fBNID\fR value
|
||||
using \fBOBJ_obj2nid()\fR. For the currently supported content types the following
|
||||
values are returned:
|
||||
.PP
|
||||
|
|
@ -188,31 +113,31 @@ values are returned:
|
|||
\& NID_pkcs7_enveloped
|
||||
.Ve
|
||||
.PP
|
||||
The return value of \fBCMS_get0_content()\fR is a pointer to the \fB\s-1ASN1_OCTET_STRING\s0\fR
|
||||
The return value of \fBCMS_get0_content()\fR is a pointer to the \fBASN1_OCTET_STRING\fR
|
||||
content pointer. That means that for example:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& ASN1_OCTET_STRING **pconf = CMS_get0_content(cms);
|
||||
.Ve
|
||||
.PP
|
||||
\&\fB*pconf\fR could be \s-1NULL\s0 if there is no embedded content. Applications can
|
||||
\&\fB*pconf\fR could be NULL if there is no embedded content. Applications can
|
||||
access, modify or create the embedded content in a \fBCMS_ContentInfo\fR structure
|
||||
using this function. Applications usually will not need to modify the
|
||||
embedded content as it is normally set by higher level functions.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBCMS_get0_type()\fR and \fBCMS_get0_eContentType()\fR return an \s-1ASN1_OBJECT\s0 structure.
|
||||
\&\fBCMS_get0_type()\fR and \fBCMS_get0_eContentType()\fR return an ASN1_OBJECT structure.
|
||||
.PP
|
||||
\&\fBCMS_set1_eContentType()\fR returns 1 for success or 0 if an error occurred. The
|
||||
error can be obtained from \fBERR_get_error\fR\|(3).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBERR_get_error\fR\|(3)
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
|
@ -15,29 +16,12 @@
|
|||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
|
|
@ -69,80 +53,21 @@
|
|||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "CMS_GET1_RECEIPTREQUEST 3ossl"
|
||||
.TH CMS_GET1_RECEIPTREQUEST 3ossl "2023-09-19" "3.0.11" "OpenSSL"
|
||||
.TH CMS_GET1_RECEIPTREQUEST 3ossl 2024-06-29 3.0.16 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
CMS_ReceiptRequest_create0_ex, CMS_ReceiptRequest_create0,
|
||||
CMS_add1_ReceiptRequest, CMS_get1_ReceiptRequest, CMS_ReceiptRequest_get0_values
|
||||
\&\- CMS signed receipt request functions
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/cms.h>
|
||||
|
|
@ -161,19 +86,19 @@ CMS_add1_ReceiptRequest, CMS_get1_ReceiptRequest, CMS_ReceiptRequest_get0_values
|
|||
\& STACK_OF(GENERAL_NAMES) **plist,
|
||||
\& STACK_OF(GENERAL_NAMES) **prto);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBCMS_ReceiptRequest_create0_ex()\fR creates a signed receipt request
|
||||
structure. The \fBsignedContentIdentifier\fR field is set using \fIid\fR and \fIidlen\fR,
|
||||
or it is set to 32 bytes of pseudo random data if \fIid\fR is \s-1NULL.\s0
|
||||
If \fIreceiptList\fR is \s-1NULL\s0 the allOrFirstTier option in \fIreceiptsFrom\fR is used
|
||||
or it is set to 32 bytes of pseudo random data if \fIid\fR is NULL.
|
||||
If \fIreceiptList\fR is NULL the allOrFirstTier option in \fIreceiptsFrom\fR is used
|
||||
and set to the value of the \fIallorfirst\fR parameter. If \fIreceiptList\fR is not
|
||||
\&\s-1NULL\s0 the \fIreceiptList\fR option in \fIreceiptsFrom\fR is used. The \fIreceiptsTo\fR
|
||||
NULL the \fIreceiptList\fR option in \fIreceiptsFrom\fR is used. The \fIreceiptsTo\fR
|
||||
parameter specifies the \fIreceiptsTo\fR field value. The library context \fIlibctx\fR
|
||||
is used to find the public random generator.
|
||||
.PP
|
||||
\&\fBCMS_ReceiptRequest_create0()\fR is similar to
|
||||
\&\fBCMS_ReceiptRequest_create0_ex()\fR but uses default values of \s-1NULL\s0 for the
|
||||
\&\fBCMS_ReceiptRequest_create0_ex()\fR but uses default values of NULL for the
|
||||
library context \fIlibctx\fR.
|
||||
.PP
|
||||
The \fBCMS_add1_ReceiptRequest()\fR function adds a signed receipt request \fBrr\fR
|
||||
|
|
@ -187,9 +112,9 @@ The signedContentIdentifier is copied to \fBpcid\fR. If the \fBallOrFirstTier\fR
|
|||
option of \fBreceiptsFrom\fR is used its value is copied to \fBpallorfirst\fR
|
||||
otherwise the \fBreceiptList\fR field is copied to \fBplist\fR. The \fBreceiptsTo\fR
|
||||
parameter is copied to \fBprto\fR.
|
||||
.SH "NOTES"
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
For more details of the meaning of the fields see \s-1RFC2634.\s0
|
||||
For more details of the meaning of the fields see RFC2634.
|
||||
.PP
|
||||
The contents of a signed receipt should only be considered meaningful if the
|
||||
corresponding CMS_ContentInfo structure can be successfully verified using
|
||||
|
|
@ -197,7 +122,7 @@ corresponding CMS_ContentInfo structure can be successfully verified using
|
|||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBCMS_ReceiptRequest_create0_ex()\fR and \fBCMS_ReceiptRequest_create0()\fR return
|
||||
a signed receipt request structure or \s-1NULL\s0 if an error occurred.
|
||||
a signed receipt request structure or NULL if an error occurred.
|
||||
.PP
|
||||
\&\fBCMS_add1_ReceiptRequest()\fR returns 1 for success or 0 if an error occurred.
|
||||
.PP
|
||||
|
|
@ -209,14 +134,14 @@ it is present but malformed.
|
|||
\&\fBERR_get_error\fR\|(3), \fBCMS_sign\fR\|(3),
|
||||
\&\fBCMS_sign_receipt\fR\|(3), \fBCMS_verify\fR\|(3)
|
||||
\&\fBCMS_verify_receipt\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
The function \fBCMS_ReceiptRequest_create0_ex()\fR was added in OpenSSL 3.0.
|
||||
.SH "COPYRIGHT"
|
||||
.SH COPYRIGHT
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright 2008\-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
.PP
|
||||
Licensed under the Apache License 2.0 (the \*(L"License\*(R"). 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 \s-1LICENSE\s0 in the source distribution or at
|
||||
in the file LICENSE in the source distribution or at
|
||||
<https://www.openssl.org/source/license.html>.
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue