You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/06/28 00:09:47 UTC

svn commit: r1606256 - /subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h

Author: breser
Date: Fri Jun 27 22:09:47 2014
New Revision: 1606256

URL: http://svn.apache.org/r1606256
Log:
On svn-auth-x509 branch, cleanup the x509.h file.

* subversion/libsvn_subr/x509.h:
  (TROPICSSL_X509_H): Remove sentinel used by TropicSSL
  (SVN_LIBSVN_SUBR_X509_H): New sentinel macro.
  (BADCERT_EXPIRED, BADCERT_REVOKED, BADCERT_CN_MISMATCH, BADCERT_NO_TRUSTED):
    Remove constants for decribing cert validation failures, which we don't do.
  (X509_OUTPUT_DER, X509_OUTPUT_PEM, PEM_LINE_LENGTH, X509_ISSUE, X509_SUBJECT):
    Remove constants used for output certs, which we don't support.
  (OID_CN, OID_PKCS1, OID_PKCS1_RSA, OID_PKCS1_RSA_SHA, OID_PKCS9_EMAIL):
    Remove object id constants we don't use.
  (__cplusplus): Add the standard extern wrapper.

Modified:
    subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h

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=1606256&r1=1606255&r2=1606256&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_subr/x509.h Fri Jun 27 22:09:47 2014
@@ -32,16 +32,11 @@
  *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef TROPICSSL_X509_H
-#define TROPICSSL_X509_H
+#ifndef SVN_LIBSVN_SUBR_X509_H
+#define SVN_LIBSVN_SUBR_X509_H
 
 #include <apr_time.h>
 
-#define BADCERT_EXPIRED                 1
-#define BADCERT_REVOKED                 2
-#define BADCERT_CN_MISMATCH             4
-#define BADCERT_NOT_TRUSTED             8
-
 /*
  * DER constants
  */
@@ -76,19 +71,12 @@
 #define X520_ORG_UNIT                  11
 #define PKCS9_EMAIL                     1
 
-#define X509_OUTPUT_DER              0x01
-#define X509_OUTPUT_PEM              0x02
-#define PEM_LINE_LENGTH                72
-#define X509_ISSUER                  0x01
-#define X509_SUBJECT                 0x02
-
 #define OID_X520                "\x55\x04"
-#define OID_CN                  "\x55\x04\x03"
-#define OID_PKCS1               "\x2A\x86\x48\x86\xF7\x0D\x01\x01"
-#define OID_PKCS1_RSA           "\x2A\x86\x48\x86\xF7\x0D\x01\x01\x01"
-#define OID_PKCS1_RSA_SHA       "\x2A\x86\x48\x86\xF7\x0D\x01\x01\x05"
 #define OID_PKCS9               "\x2A\x86\x48\x86\xF7\x0D\x01\x09"
-#define OID_PKCS9_EMAIL         "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x01"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
 
 /*
  * Structures for parsing X.509 certificates
@@ -135,8 +123,8 @@ typedef struct _x509_cert {
 
 } x509_cert;
 
-#define SVN_X509_CERTINFO_KEY_ISSUER      "issuer"
-#define SVN_X509_CERTINFO_KEY_VALID_FROM  "valid-from"
-#define SVN_X509_CERTINFO_KEY_VALID_TO    "valid-to"
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
 
-#endif        /* x509.h */
+#endif        /* SVN_LIBSVN_SUBR_X509_H */