mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 05:41:46 +08:00
23e65561e2
The unused and untested internal function ossl_a2ucompare() has been removed. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/20177)
52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
=pod
|
|
|
|
=head1 NAME
|
|
|
|
ossl_punycode_decode, ossl_a2ulabel
|
|
- internal punycode-related functions
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
#include "crypto/punycode.h"
|
|
|
|
int ossl_punycode_decode(const char *pEncoded, const size_t enc_len,
|
|
unsigned int *pDecoded, unsigned int *pout_length);
|
|
|
|
int ossl_a2ulabel(const char *in, char *out, size_t outlen);
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
PUNYCODE encoding introduced in RFCs 3490-3492 is widely used for
|
|
representation of hostnames in ASCII-only format. Some specifications,
|
|
such as RFC 8398, require comparison of hostnames encoded in UTF-8 charset.
|
|
|
|
ossl_a2ulabel() decodes NUL-terminated hostname from PUNYCODE to UTF-8,
|
|
using a provided buffer for output. The output buffer is NUL-terminated.
|
|
|
|
ossl_punycode_decode() decodes one label (one dot-separated part) from
|
|
a hostname, with stripped PUNYCODE marker I<xn-->.
|
|
|
|
=head1 RETURN VALUES
|
|
|
|
ossl_a2ulabel() returns 1 on success, 0 if the output buffer is too small and
|
|
-1 if an invalid PUNYCODE string is passed or another error occurs.
|
|
|
|
ossl_punycode_decode() returns 1 on success, 0 on error. On success,
|
|
*pout_length contains the number of codepoints decoded.
|
|
|
|
=head1 HISTORY
|
|
|
|
The functions described here were all added in OpenSSL 3.0.
|
|
|
|
=head1 COPYRIGHT
|
|
|
|
Copyright 2019-2020 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
|
|
in the file LICENSE in the source distribution or at
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
=cut
|
|
|