@@ -355,16 +355,17 @@ OPENSSL_EXPORT X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
355
355
OPENSSL_EXPORT int X509_add_ext (X509 * x , const X509_EXTENSION * ex , int loc );
356
356
357
357
// X509_sign signs |x509| with |pkey| and replaces the signature algorithm and
358
- // signature fields. It returns one on success and zero on error. This function
359
- // uses digest algorithm |md|, or |pkey|'s default if NULL. Other signing
360
- // parameters use |pkey|'s defaults. To customize them, use |X509_sign_ctx|.
358
+ // signature fields. It returns the length of the signature on success and zero
359
+ // on error. This function uses digest algorithm |md|, or |pkey|'s default if
360
+ // NULL. Other signing parameters use |pkey|'s defaults. To customize them, use
361
+ // |X509_sign_ctx|.
361
362
OPENSSL_EXPORT int X509_sign (X509 * x509 , EVP_PKEY * pkey , const EVP_MD * md );
362
363
363
364
// X509_sign_ctx signs |x509| with |ctx| and replaces the signature algorithm
364
- // and signature fields. It returns one on success and zero on error. The
365
- // signature algorithm and parameters come from |ctx|, which must have been
366
- // initialized with |EVP_DigestSignInit|. The caller should configure the
367
- // corresponding |EVP_PKEY_CTX| before calling this function.
365
+ // and signature fields. It returns the length of the signature on success and
366
+ // zero on error. The signature algorithm and parameters come from |ctx|, which
367
+ // must have been initialized with |EVP_DigestSignInit|. The caller should
368
+ // configure the corresponding |EVP_PKEY_CTX| before calling this function.
368
369
OPENSSL_EXPORT int X509_sign_ctx (X509 * x509 , EVP_MD_CTX * ctx );
369
370
370
371
// i2d_re_X509_tbs serializes the TBSCertificate portion of |x509|, as described
@@ -642,18 +643,18 @@ OPENSSL_EXPORT int X509_CRL_add_ext(X509_CRL *x, const X509_EXTENSION *ex,
642
643
int loc );
643
644
644
645
// X509_CRL_sign signs |crl| with |pkey| and replaces the signature algorithm
645
- // and signature fields. It returns one on success and zero on error. This
646
- // function uses digest algorithm |md|, or |pkey|'s default if NULL. Other
647
- // signing parameters use |pkey|'s defaults. To customize them, use
648
- // |X509_CRL_sign_ctx|.
646
+ // and signature fields. It returns the length of the signature on success and
647
+ // zero on error. This function uses digest algorithm |md|, or |pkey|'s default
648
+ // if NULL. Other signing parameters use |pkey|'s defaults. To customize them,
649
+ // use |X509_CRL_sign_ctx|.
649
650
OPENSSL_EXPORT int X509_CRL_sign (X509_CRL * crl , EVP_PKEY * pkey ,
650
651
const EVP_MD * md );
651
652
652
653
// X509_CRL_sign_ctx signs |crl| with |ctx| and replaces the signature algorithm
653
- // and signature fields. It returns one on success and zero on error. The
654
- // signature algorithm and parameters come from |ctx|, which must have been
655
- // initialized with |EVP_DigestSignInit|. The caller should configure the
656
- // corresponding |EVP_PKEY_CTX| before calling this function.
654
+ // and signature fields. It returns the length of the signature on success and
655
+ // zero on error. The signature algorithm and parameters come from |ctx|, which
656
+ // must have been initialized with |EVP_DigestSignInit|. The caller should
657
+ // configure the corresponding |EVP_PKEY_CTX| before calling this function.
657
658
OPENSSL_EXPORT int X509_CRL_sign_ctx (X509_CRL * crl , EVP_MD_CTX * ctx );
658
659
659
660
// i2d_re_X509_CRL_tbs serializes the TBSCertList portion of |crl|, as described
@@ -881,18 +882,18 @@ OPENSSL_EXPORT int X509_REQ_add_extensions(
881
882
X509_REQ * req , const STACK_OF (X509_EXTENSION ) * exts );
882
883
883
884
// X509_REQ_sign signs |req| with |pkey| and replaces the signature algorithm
884
- // and signature fields. It returns one on success and zero on error. This
885
- // function uses digest algorithm |md|, or |pkey|'s default if NULL. Other
886
- // signing parameters use |pkey|'s defaults. To customize them, use
887
- // |X509_REQ_sign_ctx|.
885
+ // and signature fields. It returns the length of the signature on success and
886
+ // zero on error. This function uses digest algorithm |md|, or |pkey|'s default
887
+ // if NULL. Other signing parameters use |pkey|'s defaults. To customize them,
888
+ // use |X509_REQ_sign_ctx|.
888
889
OPENSSL_EXPORT int X509_REQ_sign (X509_REQ * req , EVP_PKEY * pkey ,
889
890
const EVP_MD * md );
890
891
891
892
// X509_REQ_sign_ctx signs |req| with |ctx| and replaces the signature algorithm
892
- // and signature fields. It returns one on success and zero on error. The
893
- // signature algorithm and parameters come from |ctx|, which must have been
894
- // initialized with |EVP_DigestSignInit|. The caller should configure the
895
- // corresponding |EVP_PKEY_CTX| before calling this function.
893
+ // and signature fields. It returns the length of the signature on success and
894
+ // zero on error. The signature algorithm and parameters come from |ctx|, which
895
+ // must have been initialized with |EVP_DigestSignInit|. The caller should
896
+ // configure the corresponding |EVP_PKEY_CTX| before calling this function.
896
897
OPENSSL_EXPORT int X509_REQ_sign_ctx (X509_REQ * req , EVP_MD_CTX * ctx );
897
898
898
899
// i2d_re_X509_REQ_tbs serializes the CertificationRequestInfo (see RFC 2986)
@@ -2201,9 +2202,9 @@ OPENSSL_EXPORT int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *spki,
2201
2202
EVP_PKEY * pkey );
2202
2203
2203
2204
// NETSCAPE_SPKI_sign signs |spki| with |pkey| and replaces the signature
2204
- // algorithm and signature fields. It returns one on success and zero on error.
2205
- // This function uses digest algorithm |md|, or |pkey|'s default if NULL. Other
2206
- // signing parameters use |pkey|'s defaults.
2205
+ // algorithm and signature fields. It returns the length of the signature on
2206
+ // success and zero on error. This function uses digest algorithm |md|, or
2207
+ // |pkey|'s default if NULL. Other signing parameters use |pkey|'s defaults.
2207
2208
OPENSSL_EXPORT int NETSCAPE_SPKI_sign (NETSCAPE_SPKI * spki , EVP_PKEY * pkey ,
2208
2209
const EVP_MD * md );
2209
2210
0 commit comments