Removed strayed code fragment
[strongswan.git] / src / charon / plugins / unit_tester / tests / test_auth_info.c
index 37bdd10..d6abe7a 100644 (file)
@@ -18,9 +18,7 @@
 #include <config/auth_cfg.h>
 
 
-char buf[] = {0x01,0x02,0x03,0x04};
-chunk_t chunk = chunk_from_buf(buf);
-char certbuf[] = {
+static chunk_t certchunk = chunk_from_chars(
        0x30,0x82,0x02,0xfa,0x30,0x82,0x01,0xe2,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x5a,
        0xf2,0x65,0xae,0x78,0xff,0x23,0xde,0xf7,0xa6,0xa3,0x94,0x8c,0x3f,0xa0,0xc1,0x30,
        0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x39,
@@ -69,8 +67,7 @@ char certbuf[] = {
        0xec,0xd2,0x31,0xc6,0x1e,0xb6,0xc0,0x57,0xd9,0xe1,0x14,0x06,0x9b,0xf8,0x51,0x69,
        0x47,0xf0,0x9c,0xcd,0x69,0xef,0x8e,0x5f,0x62,0xda,0x10,0xf7,0x3c,0x6d,0x0f,0x33,
        0xec,0x6f,0xfd,0x94,0x07,0x16,0x41,0x32,0x06,0xa4,0xe1,0x08,0x31,0x87,
-};
-chunk_t certchunk = chunk_from_buf(certbuf);
+);
 
 /*******************************************************************************
  * auth info test
@@ -83,7 +80,7 @@ bool test_auth_cfg()
        int round = 0;
        void *value;
        auth_rule_t type;
-       
+
        c1 = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
                                                        BUILD_BLOB_ASN1_DER, certchunk,
                                                        BUILD_END);
@@ -91,7 +88,7 @@ bool test_auth_cfg()
        {
                return FALSE;
        }
-       
+
        auth->add(auth, AUTH_RULE_SUBJECT_CERT, c1->get_ref(c1));
        c2 = auth->get(auth, AUTH_RULE_SUBJECT_CERT);
        if (!c2)
@@ -102,7 +99,7 @@ bool test_auth_cfg()
        {
                return FALSE;
        }
-       
+
        enumerator = auth->create_enumerator(auth);
        while (enumerator->enumerate(enumerator, &type, &value))
        {
@@ -114,11 +111,11 @@ bool test_auth_cfg()
                return FALSE;
        }
        enumerator->destroy(enumerator);
-       
+
        auth2 = auth_cfg_create();
        auth2->add(auth2, AUTH_RULE_CA_CERT, c1->get_ref(c1));
        auth2->merge(auth2, auth, FALSE);
-       
+
        round = 0;
        enumerator = auth2->create_enumerator(auth2);
        while (enumerator->enumerate(enumerator, &type, &value))