You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@wandisco.com> on 2014/11/03 17:41:20 UTC

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

On 03.11.2014 17:36, philip@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


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

Posted by Branko Čibej <br...@wandisco.com>.
On 03.11.2014 17:50, Philip Martin wrote:
> Branko Čibej <br...@wandisco.com> writes:
>
>> Good catch. The array should be const, too.
> There is a struct declaration that should be moved as well, r1636388.

Saw that; nice.

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

Posted by Philip Martin <ph...@wandisco.com>.
Branko Čibej <br...@wandisco.com> writes:

> Good catch. The array should be const, too.

There is a struct declaration that should be moved as well, r1636388.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*