SolidSyslog coverage report
Current view: top level - Platform/WolfSsl/Source - SolidSyslogWolfSslStreamAnchoredPinsAfterHandshake.c (source / functions) Coverage Total Hit
Test: SolidSyslog Lines: 100.0 % 9 9
Test Date: 2026-11-12 23:14:35 Functions: 100.0 % 2 2

            Line data    Source code
       1              : /* SPDX-FileCopyrightText: Copyright 2026 Cozens Software Solutions Limited
       2              :  * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 OR LicenseRef-PolyForm-Internal-Use-1.0.0 OR LicenseRef-COSOSO-Commercial
       3              :  */
       4              : 
       5              : #include "SolidSyslogWolfSslSettings.h"
       6              : 
       7              : #include "SolidSyslogWolfSslStreamPrivate.h"
       8              : 
       9              : #if SOLIDSYSLOG_WOLFSSL_ANCHORED_PIN_CHECK == SOLIDSYSLOG_WOLFSSL_ANCHORED_PIN_CHECK_AFTER_HANDSHAKE
      10              : 
      11              : #include <wolfssl/ssl.h>
      12              : 
      13           14 : enum SolidSyslogWolfSslAnchoredPinCheck SolidSyslogWolfSslStream_AnchoredPinCheck(void)
      14              : {
      15           14 :     return SOLIDSYSLOG_WOLFSSL_PIN_BESIDE_ANCHORS_AFTER_HANDSHAKE;
      16              : }
      17              : 
      18            9 : void SolidSyslogWolfSslStream_AuthoriseKeptPeer(struct SolidSyslogWolfSslStream* self)
      19              : {
      20            9 :     WOLFSSL_X509* peer = wolfSSL_get_peer_certificate(self->Session);
      21            9 :     int length = 0;
      22            9 :     const unsigned char* der = wolfSSL_X509_get_der(peer, &length);
      23            9 :     (void) SolidSyslogWolfSslStream_AuthoriseLeaf(self, der, (word32) length);
      24            9 :     wolfSSL_X509_free(peer);
      25            9 : }
      26              : 
      27              : #endif
        

Generated by: LCOV version 2.0-1