[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1636386 - in /subversion/branches/svn-auth-x509/subversion/libsvn_subr: x509.h x509info.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Mon, 03 Nov 2014 17:41:20 +0100

On 03.11.2014 17:36, philip_at_apache.org wrote:
> Author: philip
> Date: Mon Nov 3 16:36:25 2014
> New Revision: 1636386
>
> URL: http://svn.apache.org/r1636386
> Log:
> On svn-auth-x509 branch: move static array from header to the
> only file that uses it to avoid duplicate allocation.
>
> * subversion/libsvn_subr/x509.h
> (an1_oid asn1_oids): Move to ...
>
> * subversion/libsvn_subr/x509info.c
> (an1_oid asn1_oids): ... here.
>
> Modified:
> subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h
> subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509info.c
>
> Modified: subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h
> URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h?rev=1636386&r1=1636385&r2=1636386&view=diff
> ==============================================================================
> --- subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h (original)
> +++ subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h Mon Nov 3 16:36:25 2014
> @@ -72,17 +72,6 @@ typedef struct asn1_oid {
> const char *long_label;
> } asn1_oid;
>
> -static asn1_oid asn1_oids[] = {
> - { SVN_X509_OID_COMMON_NAME, "CN", "commonName" },
> - { SVN_X509_OID_COUNTRY, "C", "countryName" },
> - { SVN_X509_OID_LOCALITY, "L", "localityName" },
> - { SVN_X509_OID_STATE, "ST", "stateOrProvinceName" },
> - { SVN_X509_OID_ORGANIZATION, "O", "organizationName" },
> - { SVN_X509_OID_ORG_UNIT, "OU", "organizationalUnitName"},
> - { SVN_X509_OID_EMAIL, NULL, "emailAddress" },
> - { NULL },
> -};
> -
> #define OID_SUBJECT_ALT_NAME "\x55\x1D\x11"
>
> #ifdef __cplusplus
>
> Modified: subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509info.c
> URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509info.c?rev=1636386&r1=1636385&r2=1636386&view=diff
> ==============================================================================
> --- subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509info.c (original)
> +++ subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509info.c Mon Nov 3 16:36:25 2014
> @@ -102,6 +102,17 @@ svn_x509_certinfo_dup(const svn_x509_cer
> return result;
> }
>
> +static asn1_oid asn1_oids[] = {
> + { SVN_X509_OID_COMMON_NAME, "CN", "commonName" },
> + { SVN_X509_OID_COUNTRY, "C", "countryName" },
> + { SVN_X509_OID_LOCALITY, "L", "localityName" },
> + { SVN_X509_OID_STATE, "ST", "stateOrProvinceName" },
> + { SVN_X509_OID_ORGANIZATION, "O", "organizationName" },
> + { SVN_X509_OID_ORG_UNIT, "OU", "organizationalUnitName"},
> + { SVN_X509_OID_EMAIL, NULL, "emailAddress" },
> + { NULL },
> +};

Good catch. The array should be const, too.

-- Brane
Received on 2014-11-03 17:42:38 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.