From: Matt Caswell Date: Mon, 15 Aug 2016 09:07:30 +0000 (+0100) Subject: Make X509_NAME_get0_der() conform to OpenSSL style X-Git-Tag: OpenSSL_1_1_0~159 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=6eabcc839f381bf07d004869ca8fe855edbb4846 Make X509_NAME_get0_der() conform to OpenSSL style Put the main object first in the params list. Reviewed-by: Richard Levitte Reviewed-by: Stephen Henson --- diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index a2eb709c83..a7ae31e61e 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c @@ -550,8 +550,8 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase) return 0; } -int X509_NAME_get0_der(const unsigned char **pder, size_t *pderlen, - X509_NAME *nm) +int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder, + size_t *pderlen) { /* Make sure encoding is valid */ if (i2d_X509_NAME(nm, NULL) <= 0) diff --git a/doc/crypto/X509_NAME_get0_der.pod b/doc/crypto/X509_NAME_get0_der.pod index 062bc7e7b4..f91fd4d977 100644 --- a/doc/crypto/X509_NAME_get0_der.pod +++ b/doc/crypto/X509_NAME_get0_der.pod @@ -8,8 +8,8 @@ X509_NAME_get0_der - get X509_NAME DER encoding #include - int X509_NAME_get0_der(const unsigned char **pder, size_t *pderlen, - X509_NAME *nm) + int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder, + size_t *pderlen) =head1 DESCRIPTION diff --git a/include/openssl/x509.h b/include/openssl/x509.h index f8d188147b..a5b821b647 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -798,8 +798,8 @@ ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne); ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne); int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne); -int X509_NAME_get0_der(const unsigned char **pder, size_t *pderlen, - X509_NAME *nm); +int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder, + size_t *pderlen); int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x); int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x,