diff options
author | Pauli <paul.dale@oracle.com> | 2020-09-30 12:15:12 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-10-01 11:25:12 +1000 |
commit | a55b00bdbc00b1632e551cf71bce72137e683c12 (patch) | |
tree | 250ce0774c55af4be08453594f249d30bb8fa91f /doc | |
parent | c4232b9edbeb242583a804dfb0bafaf57610e6fb (diff) |
der: _ossl prefix DER functions
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13038)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/internal/man3/ossl_DER_w_begin_sequence.pod (renamed from doc/internal/man3/DER_w_begin_sequence.pod) | 8 | ||||
-rw-r--r-- | doc/internal/man3/ossl_DER_w_bn.pod (renamed from doc/internal/man3/DER_w_bn.pod) | 32 | ||||
-rw-r--r-- | doc/internal/man3/ossl_DER_w_precompiled.pod (renamed from doc/internal/man3/DER_w_precompiled.pod) | 14 | ||||
-rw-r--r-- | doc/internal/man7/DERlib.pod | 41 |
4 files changed, 48 insertions, 47 deletions
diff --git a/doc/internal/man3/DER_w_begin_sequence.pod b/doc/internal/man3/ossl_DER_w_begin_sequence.pod index 3d221a942f..b78056f6e1 100644 --- a/doc/internal/man3/DER_w_begin_sequence.pod +++ b/doc/internal/man3/ossl_DER_w_begin_sequence.pod @@ -2,15 +2,15 @@ =head1 NAME -DER_w_begin_sequence, DER_w_end_sequence +ossl_DER_w_begin_sequence, ossl_DER_w_end_sequence - internal DER writers for DER constructed elements =head1 SYNOPSIS #include "internal/der.h" - int DER_w_begin_sequence(WPACKET *pkt, int tag); - int DER_w_end_sequence(WPACKET *pkt, int tag); + int ossl_DER_w_begin_sequence(WPACKET *pkt, int tag); + int ossl_DER_w_end_sequence(WPACKET *pkt, int tag); =head1 DESCRIPTION @@ -22,7 +22,7 @@ and B<end>. When using these, special care must be taken to ensure that the ASN.1 tag value I<tag> is the same in the matching C<begin> and C<end> function calls. -DER_w_begin_sequence() and DER_w_end_sequence() begins and ends a +ossl_DER_w_begin_sequence() and ossl_DER_w_end_sequence() begins and ends a SEQUENCE. =head1 RETURN VALUES diff --git a/doc/internal/man3/DER_w_bn.pod b/doc/internal/man3/ossl_DER_w_bn.pod index deea5de346..a5bdd848bf 100644 --- a/doc/internal/man3/DER_w_bn.pod +++ b/doc/internal/man3/ossl_DER_w_bn.pod @@ -2,21 +2,21 @@ =head1 NAME -DER_w_boolean, DER_w_ulong, DER_w_bn, DER_w_null, -DER_w_octet_string, DER_w_octet_string_uint32 +ossl_DER_w_boolean, ossl_DER_w_ulong, ossl_DER_w_bn, ossl_DER_w_null, +ossl_DER_w_octet_string, ossl_DER_w_octet_string_uint32 - internal DER writers for DER primitives =head1 SYNOPSIS #include "internal/der.h" - int DER_w_boolean(WPACKET *pkt, int tag, int b); - int DER_w_ulong(WPACKET *pkt, int tag, unsigned long v); - int DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v); - int DER_w_null(WPACKET *pkt, int tag); - int DER_w_octet_string(WPACKET *pkt, int tag, - const unsigned char *data, size_t data_n); - int DER_w_octet_string_uint32(WPACKET *pkt, int tag, uint32_t value); + int ossl_DER_w_boolean(WPACKET *pkt, int tag, int b); + int ossl_DER_w_ulong(WPACKET *pkt, int tag, unsigned long v); + int ossl_DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v); + int ossl_DER_w_null(WPACKET *pkt, int tag); + int ossl_DER_w_octet_string(WPACKET *pkt, int tag, + const unsigned char *data, size_t data_n); + int ossl_DER_w_octet_string_uint32(WPACKET *pkt, int tag, uint32_t value); =head1 DESCRIPTION @@ -25,23 +25,23 @@ All functions described here behave the same way, they prepend their respective value to the already written output buffer held by I<pkt>. -DER_w_boolean() writes the primitive BOOLEAN using the value I<b>. +ossl_DER_w_boolean() writes the primitive BOOLEAN using the value I<b>. Any value that evaluates as true will render a B<true> BOOLEAN, otherwise a B<false> BOOLEAN. -DER_w_ulong() and DER_w_bn() both write the primitive INTEGER using +ossl_DER_w_ulong() and ossl_DER_w_bn() both write the primitive INTEGER using the value I<v>. =for comment Other similar functions for diverse C integers should be added. -DER_w_null() writes the primitive NULL. +ossl_DER_w_null() writes the primitive NULL. -DER_w_octet_string() writes the primitive OCTET STRING using the bytes from -I<data> with a length of I<data_n>. +ossl_DER_w_octet_string() writes the primitive OCTET STRING using the bytes +from I<data> with a length of I<data_n>. -DER_w_octet_string_uint32() writes the primitive OCTET STRING using a 32 bit -value in I<value>. +ossl_DER_w_octet_string_uint32() writes the primitive OCTET STRING using a +32 bit value in I<value>. =head1 RETURN VALUES diff --git a/doc/internal/man3/DER_w_precompiled.pod b/doc/internal/man3/ossl_DER_w_precompiled.pod index 81a92526af..aa7fa3930f 100644 --- a/doc/internal/man3/DER_w_precompiled.pod +++ b/doc/internal/man3/ossl_DER_w_precompiled.pod @@ -2,16 +2,16 @@ =head1 NAME -DER_w_precompiled +ossl_DER_w_precompiled - internal DER writers for precompiled DER blobs =head1 SYNOPSIS #include "internal/der.h" - int DER_w_precompiled(WPACKET *pkt, int tag, - const unsigned char *precompiled, - size_t precompiled_n); + int ossl_DER_w_precompiled(WPACKET *pkt, int tag, + const unsigned char *precompiled, + size_t precompiled_n); =head1 DESCRIPTION @@ -19,15 +19,15 @@ There may be already existing DER blobs that can simply be copied to the buffer held by I<pkt>. For example, precompiled values, such as OIDs (for example, C<id-sha256>) or complete AlgorithmIdentifiers (for example, C<sha256Identifier>). To add those as an element in a -structure being DER encoded, use DER_w_precompiled(). +structure being DER encoded, use ossl_DER_w_precompiled(). -DER_w_precompiled() will simply take the DER encoded blob given as +ossl_DER_w_precompiled() will simply take the DER encoded blob given as I<precompiled> with length I<precompiled_n> and add it to the buffer held by I<pkt>. =head1 RETURN VALUES -DER_w_precompiled() returns 1 on success and 0 on failure. Failure +ossl_DER_w_precompiled() returns 1 on success and 0 on failure. Failure may mean that the buffer held by the I<pkt> is too small, but may also mean that the values given to the functions are invalid, such as the provided I<tag> value being too large for the implementation. diff --git a/doc/internal/man7/DERlib.pod b/doc/internal/man7/DERlib.pod index 2577df0caa..7085a2cb6d 100644 --- a/doc/internal/man7/DERlib.pod +++ b/doc/internal/man7/DERlib.pod @@ -50,10 +50,10 @@ which is defined like this in ASN.1 terms: With the DER library, this is the corresponding code, given two OpenSSL B<BIGNUM>s I<r> and I<s>: - int ok = DER_w_begin_sequence(pkt, -1) - && DER_w_bn(pkg, -1, s) - && DER_w_bn(pkg, -1, r) - && DER_w_end_sequence(pkt, -1); + int ok = ossl_DER_w_begin_sequence(pkt, -1) + && ossl_DER_w_bn(pkg, -1, s) + && ossl_DER_w_bn(pkg, -1, r) + && ossl_DER_w_end_sequence(pkt, -1); As an example of the use of I<tag>, an ASN.1 element like this: @@ -61,7 +61,7 @@ As an example of the use of I<tag>, an ASN.1 element like this: Would be encoded like this: - DER_w_bn(pkt, 1, v) + ossl_DER_w_bn(pkt, 1, v) =begin comment @@ -116,25 +116,26 @@ value: int tag, RSA *rsa) { - return DER_w_begin_sequence(pkt, tag) - && (DER_w_begin_sequence(pkt, DER_NO_CONTEXT) - && DER_w_ulong(pkt, 2, 20) - && DER_w_precompiled(pkt, 1, - der_mgf1SHA256Identifier, - sizeof(der_mgf1SHA256Identifier)) - && DER_w_precompiled(pkt, 0, - der_sha256Identifier, - sizeof(der_sha256Identifier)) - && DER_w_end_sequence(pkt, DER_NO_CONTEXT)) - && DER_w_precompiled(pkt, DER_NO_CONTEXT, - der_id_RSASSA_PSS, - sizeof(der_id_RSASSA_PSS)) - && DER_w_end_sequence(pkt, tag); + return ossl_DER_w_begin_sequence(pkt, tag) + && (ossl_DER_w_begin_sequence(pkt, DER_NO_CONTEXT) + && ossl_DER_w_ulong(pkt, 2, 20) + && ossl_DER_w_precompiled(pkt, 1, + der_mgf1SHA256Identifier, + sizeof(der_mgf1SHA256Identifier)) + && ossl_DER_w_precompiled(pkt, 0, + der_sha256Identifier, + sizeof(der_sha256Identifier)) + && ossl_DER_w_end_sequence(pkt, DER_NO_CONTEXT)) + && ossl_DER_w_precompiled(pkt, DER_NO_CONTEXT, + der_id_RSASSA_PSS, + sizeof(der_id_RSASSA_PSS)) + && ossl_DER_w_end_sequence(pkt, tag); } =head1 SEE ALSO -L<DER_w_bn(3)>, L<DER_w_begin_sequence(3)>, L<DER_w_precompiled(3)> +L<ossl_DER_w_bn(3)>, L<ossl_DER_w_begin_sequence(3)>, +L<ossl_DER_w_precompiled(3)> =head1 COPYRIGHT |