VirtualBox

source: vbox/trunk/src/libs/openssl-3.3.2/doc/man3/X509_sign.pod

Last change on this file was 108206, checked in by vboxsync, 3 months ago

openssl-3.3.2: Exported all files to OSE and removed .scm-settings ​bugref:10757

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1=pod
2
3=head1 NAME
4
5X509_sign, X509_sign_ctx,
6X509_REQ_sign, X509_REQ_sign_ctx,
7X509_CRL_sign, X509_CRL_sign_ctx -
8sign certificate, certificate request, or CRL signature
9
10=head1 SYNOPSIS
11
12 #include <openssl/x509.h>
13
14 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
15 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
16
17 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
18 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
19
20 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
21 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
22
23=head1 DESCRIPTION
24
25X509_sign() signs certificate I<x> using private key I<pkey> and message
26digest I<md> and sets the signature in I<x>. X509_sign_ctx() also signs
27certificate I<x> but uses the parameters contained in digest context I<ctx>.
28If the certificate information includes X.509 extensions,
29these two functions make sure that the certificate bears X.509 version 3.
30
31X509_REQ_sign(), X509_REQ_sign_ctx(),
32X509_CRL_sign(), and X509_CRL_sign_ctx()
33sign certificate requests and CRLs, respectively.
34
35=head1 NOTES
36
37X509_sign_ctx() is used where the default parameters for the corresponding
38public key and digest are not suitable. It can be used to sign keys using
39RSA-PSS for example.
40
41For efficiency reasons and to work around ASN.1 encoding issues the encoding
42of the signed portion of a certificate, certificate request and CRL is cached
43internally. If the signed portion of the structure is modified the encoding
44is not always updated meaning a stale version is sometimes used. This is not
45normally a problem because modifying the signed portion will invalidate the
46signature and signing will always update the encoding.
47
48=head1 RETURN VALUES
49
50All functions return the size of the signature
51in bytes for success and zero for failure.
52
53=head1 SEE ALSO
54
55L<ERR_get_error(3)>,
56L<X509_NAME_add_entry_by_txt(3)>,
57L<X509_new(3)>,
58L<X509_verify_cert(3)>,
59L<X509_verify(3)>,
60L<X509_REQ_verify_ex(3)>, L<X509_REQ_verify(3)>,
61L<X509_CRL_verify(3)>
62
63=head1 HISTORY
64
65The X509_sign(), X509_REQ_sign() and X509_CRL_sign() functions are
66available in all versions of OpenSSL.
67
68The X509_sign_ctx(), X509_REQ_sign_ctx()
69and X509_CRL_sign_ctx() functions were added in OpenSSL 1.0.1.
70
71=head1 COPYRIGHT
72
73Copyright 2015-2023 The OpenSSL Project Authors. All Rights Reserved.
74
75Licensed under the Apache License 2.0 (the "License"). You may not use
76this file except in compliance with the License. You can obtain a copy
77in the file LICENSE in the source distribution or at
78L<https://www.openssl.org/source/license.html>.
79
80=cut
Note: See TracBrowser for help on using the repository browser.

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