subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1607122 - in /subversion/branches/svn-auth-x509/subversion/libsvn_subr: x509.h x509parse.c
Date Tue, 01 Jul 2014 15:53:37 GMT
Author: breser
Date: Tue Jul  1 15:53:36 2014
New Revision: 1607122

URL: http://svn.apache.org/r1607122
Log:
On svn-auth-x509 branch, remove some unused/unnecessary fields.

* subversion/libsvn_subr/x509.h
  (x509_cert): Remove tbs, issuer_raw, subject_raw, pk_oid, v3_ext, ca_istrue,
    and max_pathlen members.

* subversion/libsvn_subr/x509parse.c
  (svn_x509_parse_cert): Remove the code to store the tbs and raw members of
    x509_cert struct.  These existed to allow some other app to be able to do
    its own parsing of the cert if it wanted something TropicSSL didn't
    provide, but we don't return the x509_cert struct so they're useless.

Modified:
    subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h
    subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.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=1607122&r1=1607121&r2=1607122&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h Tue Jul  1 15:53:36 2014
@@ -94,29 +94,18 @@ typedef struct _x509_name {
 } x509_name;
 
 typedef struct _x509_cert {
-  x509_buf tbs;
-
   int version;
   x509_buf serial;
   x509_buf sig_oid1;
 
-  x509_buf issuer_raw;
-  x509_buf subject_raw;
-
   x509_name issuer;
   x509_name subject;
 
   apr_time_t valid_from;
   apr_time_t valid_to;
 
-  x509_buf pk_oid;
-
   x509_buf issuer_id;
   x509_buf subject_id;
-  x509_buf v3_ext;
-
-  int ca_istrue;
-  int max_pathlen;
 
   x509_buf sig_oid2;
   x509_buf sig;

Modified: subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c?rev=1607122&r1=1607121&r2=1607122&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509parse.c Tue Jul  1 15:53:36
2014
@@ -668,14 +668,11 @@ svn_x509_parse_cert(apr_hash_t **certinf
   /*
    * TBSCertificate  ::=  SEQUENCE  {
    */
-  crt->tbs.p = p;
-
   err = asn1_get_tag(&p, end, &len, ASN1_CONSTRUCTED | ASN1_SEQUENCE);
   if (err)
     return svn_error_create(SVN_ERR_X509_CERT_INVALID_FORMAT, err, NULL);
 
   end = p + len;
-  crt->tbs.len = (int) (end - crt->tbs.p);
 
   /*
    * Version      ::=      INTEGER  {      v1(0), v2(1), v3(2)  }
@@ -697,16 +694,12 @@ svn_x509_parse_cert(apr_hash_t **certinf
   /*
    * issuer                               Name
    */
-  crt->issuer_raw.p = p;
-
   err = asn1_get_tag(&p, end, &len, ASN1_CONSTRUCTED | ASN1_SEQUENCE);
   if (err)
     return svn_error_create(SVN_ERR_X509_CERT_INVALID_FORMAT, err, NULL);
 
   SVN_ERR(x509_get_name(&p, p + len, &crt->issuer, scratch_pool));
 
-  crt->issuer_raw.len = (int) (p - crt->issuer_raw.p);
-
   /*
    * Validity ::= SEQUENCE {
    *              notBefore          Time,
@@ -719,16 +712,12 @@ svn_x509_parse_cert(apr_hash_t **certinf
   /*
    * subject                              Name
    */
-  crt->subject_raw.p = p;
-
   err = asn1_get_tag(&p, end, &len, ASN1_CONSTRUCTED | ASN1_SEQUENCE);
   if (err)
     return svn_error_create(SVN_ERR_X509_CERT_INVALID_FORMAT, err, NULL);
 
   SVN_ERR(x509_get_name(&p, p + len, &crt->subject, scratch_pool));
 
-  crt->subject_raw.len = (int) (p - crt->subject_raw.p);
-
   /*
    * SubjectPublicKeyInfo  ::=  SEQUENCE
    *              algorithm                        AlgorithmIdentifier,



Mime
View raw message