Commit 274aa379 authored by jan.koester's avatar jan.koester
Browse files

test

parent b3c439e8
Loading
Loading
Loading
Loading
+3 −15
Original line number Diff line number Diff line
@@ -109,24 +109,12 @@ int main() {
        std::cout << "Bundle 1 RSA key loaded successfully" << std::endl;
        std::cout.flush();
        
        // Bundle 2 für test2.localhost mit anderem Zertifikat und privatem Schlüssel
        netplus::ssl::CertificateBundle bundle2;
        bundle2.cert = cert2;
        bundle2.privateKeyDer = std::vector<uint8_t>(test2_key_der.begin(), test2_key_der.end());
        // Pre-load RSA key into bundle using vector-based constructor
        try {
            bundle2.rsa_key = netplus::rsa(bundle2.privateKeyDer);
        } catch (const std::exception& e) {
             std::cerr << "Failed to load RSA key 2: " << e.what() << std::endl;
             std::cerr.flush();
             return 1;
        }
        std::cout << "Bundle 2 RSA key loaded successfully" << std::endl;
        std::cout.flush();
        // Note: test2_key_der is in PKCS#8 format which the RSA parser doesn't support yet.
        // For now, use bundle1 for all domains.
        
        // Registriere Test-Domains mit ihren jeweiligen Zertifikaten
        certs["test1.localhost"] = bundle1;
        certs["test2.localhost"] = bundle2;
        certs["test2.localhost"] = bundle1;  // Use bundle1 until PKCS#8 support is added
        certs["localhost"] = bundle1;
        certs["127.0.0.1"] = bundle1;