VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.0/doc/internal/man3/ossl_punycode_decode.pod@ 99507

最後變更 在這個檔案從99507是 99366,由 vboxsync 提交於 2 年 前

openssl-3.1.0: Applied and adjusted our OpenSSL changes to 3.0.7. bugref:10418

檔案大小: 1.9 KB
 
1=pod
2
3=head1 NAME
4
5ossl_punycode_decode, ossl_a2ulabel, ossl_a2ucompare
6- internal punycode-related functions
7
8=head1 SYNOPSIS
9
10 #include "crypto/punycode.h"
11
12 int ossl_punycode_decode(const char *pEncoded, const size_t enc_len,
13 unsigned int *pDecoded, unsigned int *pout_length);
14
15 int ossl_a2ulabel(const char *in, char *out, size_t outlen);
16
17 int ossl_a2ucompare(const char *a, const char *u);
18
19=head1 DESCRIPTION
20
21PUNYCODE encoding introduced in RFCs 3490-3492 is widely used for
22representation of hostnames in ASCII-only format. Some specifications,
23such as RFC 8398, require comparison of hostnames encoded in UTF-8 charset.
24
25ossl_a2ulabel() decodes NUL-terminated hostname from PUNYCODE to UTF-8,
26using a provided buffer for output. The output buffer is NUL-terminated.
27
28ossl_a2ucompare() accepts two NUL-terminated hostnames, decodes the 1st
29from PUNYCODE to UTF-8 and compares it with the 2nd one as is.
30
31ossl_punycode_decode() decodes one label (one dot-separated part) from
32a hostname, with stripped PUNYCODE marker I<xn-->.
33
34=head1 RETURN VALUES
35
36ossl_a2ulabel() returns 1 on success, 0 if the output buffer is too small and
37-1 if an invalid PUNYCODE string is passed or another error occurs.
38
39ossl_a2ucompare() returns 1 on non-equal strings, 0 on equal strings,
40-1 when an invalid PUNYCODE string is passed or another error occurs.
41
42ossl_punycode_decode() returns 1 on success, 0 on error. On success,
43*pout_length contains the number of codepoints decoded.
44
45=head1 HISTORY
46
47The functions described here were all added in OpenSSL 3.0.
48
49=head1 COPYRIGHT
50
51Copyright 2019-2022 The OpenSSL Project Authors. All Rights Reserved.
52
53Licensed under the Apache License 2.0 (the "License"). You may not use
54this file except in compliance with the License. You can obtain a copy
55in the file LICENSE in the source distribution or at
56L<https://www.openssl.org/source/license.html>.
57
58=cut
59
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette