Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/tls_schannel: add DTLS support
Date: Sun, 13 Jul 2025 02:32:57 +0200
Message-ID: <20250713003257.GA1099245@pb2> (raw)
In-Reply-To: <20250711160418.F0282412864@natalya.videolan.org>


[-- Attachment #1.1: Type: text/plain, Size: 8291 bytes --]

On Fri, Jul 11, 2025 at 04:04:17PM +0000, Timo Rothenpieler wrote:
> ffmpeg | branch: master | Timo Rothenpieler <timo@rothenpieler.org> | Tue Jun 24 19:30:19 2025 +0200| [90fa9636efff84ec5a4b06815722c08188dca551] | committer: Timo Rothenpieler
> 
> avformat/tls_schannel: add DTLS support
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90fa9636efff84ec5a4b06815722c08188dca551
> ---
> 
>  configure                  |   6 +-
>  libavformat/tls_schannel.c | 890 +++++++++++++++++++++++++++++++++++++++++----
>  libavformat/version.h      |   2 +-
>  3 files changed, 833 insertions(+), 65 deletions(-)

breaks on mingw64

src/libavformat/tls_schannel.c: In function ‘ff_dtls_export_materials’:
src/libavformat/tls_schannel.c:606:5: error: unknown type name ‘SecPkgContext_KeyingMaterialInfo’; did you mean ‘SecPkgContext_NegotiationInfo’?
  606 |     SecPkgContext_KeyingMaterialInfo keying_info = { 0 };
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     SecPkgContext_NegotiationInfo
src/libavformat/tls_schannel.c:607:5: error: unknown type name ‘SecPkgContext_KeyingMaterial’; did you mean ‘SecPkgContext_KeyInfoW’?
  607 |     SecPkgContext_KeyingMaterial keying_material = { 0 };
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     SecPkgContext_KeyInfoW
src/libavformat/tls_schannel.c:615:16: error: request for member ‘cbLabel’ in something not a structure or union
  615 |     keying_info.cbLabel = strlen(dst) + 1;
      |                ^
src/libavformat/tls_schannel.c:616:16: error: request for member ‘pszLabel’ in something not a structure or union
  616 |     keying_info.pszLabel = (LPSTR)dst;
      |                ^
src/libavformat/tls_schannel.c:617:16: error: request for member ‘cbContextValue’ in something not a structure or union
  617 |     keying_info.cbContextValue = 0;
      |                ^
src/libavformat/tls_schannel.c:618:16: error: request for member ‘pbContextValue’ in something not a structure or union
  618 |     keying_info.pbContextValue = NULL;
      |                ^
src/libavformat/tls_schannel.c:619:16: error: request for member ‘cbKeyingMaterial’ in something not a structure or union
  619 |     keying_info.cbKeyingMaterial = materials_sz;
      |                ^
src/libavformat/tls_schannel.c:621:54: error: ‘SECPKG_ATTR_KEYING_MATERIAL_INFO’ undeclared (first use in this function); did you mean ‘SECPKG_ATTR_NEGOTIATION_INFO’?
  621 |     sspi_ret = SetContextAttributes(&c->ctxt_handle, SECPKG_ATTR_KEYING_MATERIAL_INFO, &keying_info, sizeof(keying_info));
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                      SECPKG_ATTR_NEGOTIATION_INFO
src/libavformat/tls_schannel.c:621:54: note: each undeclared identifier is reported only once for each function it appears in
src/libavformat/tls_schannel.c:627:56: error: ‘SECPKG_ATTR_KEYING_MATERIAL’ undeclared (first use in this function)
  627 |     sspi_ret = QueryContextAttributes(&c->ctxt_handle, SECPKG_ATTR_KEYING_MATERIAL, &keying_material);
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/libavformat/tls_schannel.c:633:48: error: request for member ‘pbKeyingMaterial’ in something not a structure or union
  633 |     memcpy(dtls_srtp_materials, keying_material.pbKeyingMaterial, FFMIN(materials_sz, keying_material.cbKeyingMaterial));
      |                                                ^
In file included from src/libavutil/error.h:30,
                 from src/libavutil/common.h:43,
                 from src/libavutil/avutil.h:300,
                 from src/libavcodec/codec_par.h:26,
                 from src/libavformat/avformat.h:312,
                 from src/libavformat/tls_schannel.c:24:
src/libavformat/tls_schannel.c:633:102: error: request for member ‘cbKeyingMaterial’ in something not a structure or union
  633 |     memcpy(dtls_srtp_materials, keying_material.pbKeyingMaterial, FFMIN(materials_sz, keying_material.cbKeyingMaterial));
      |                                                                                                      ^
src/libavutil/macros.h:49:28: note: in definition of macro ‘FFMIN’
   49 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
      |                            ^
src/libavformat/tls_schannel.c:633:102: error: request for member ‘cbKeyingMaterial’ in something not a structure or union
  633 |     memcpy(dtls_srtp_materials, keying_material.pbKeyingMaterial, FFMIN(materials_sz, keying_material.cbKeyingMaterial));
      |                                                                                                      ^
src/libavutil/macros.h:49:34: note: in definition of macro ‘FFMIN’
   49 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
      |                                  ^
src/libavformat/tls_schannel.c:634:38: error: request for member ‘pbKeyingMaterial’ in something not a structure or union
  634 |     FreeContextBuffer(keying_material.pbKeyingMaterial);
      |                                      ^
src/libavformat/tls_schannel.c:636:24: error: request for member ‘cbKeyingMaterial’ in something not a structure or union
  636 |     if (keying_material.cbKeyingMaterial > materials_sz) {
      |                        ^
src/libavformat/tls_schannel.c:637:96: error: request for member ‘cbKeyingMaterial’ in something not a structure or union
  637 |         av_log(h, AV_LOG_WARNING, "Keying material size mismatch: %ld > %zu\n", keying_material.cbKeyingMaterial, materials_sz);
      |                                                                                                ^
src/libavformat/tls_schannel.c: In function ‘tls_shutdown_client’:
src/libavformat/tls_schannel.c:710:29: error: ‘SEC_I_MESSAGE_FRAGMENT’ undeclared (first use in this function)
  710 |         } while(sspi_ret == SEC_I_MESSAGE_FRAGMENT || sspi_ret == SEC_I_CONTINUE_NEEDED);
      |                             ^~~~~~~~~~~~~~~~~~~~~~
src/libavformat/tls_schannel.c: In function ‘tls_handshake_loop’:
src/libavformat/tls_schannel.c:862:62: error: ‘SEC_I_MESSAGE_FRAGMENT’ undeclared (first use in this function)
  862 |         if (sspi_ret == SEC_I_CONTINUE_NEEDED || sspi_ret == SEC_I_MESSAGE_FRAGMENT || sspi_ret == SEC_E_OK) {
      |                                                              ^~~~~~~~~~~~~~~~~~~~~~
src/libavformat/tls_schannel.c: In function ‘tls_handshake’:
src/libavformat/tls_schannel.c:1016:58: error: ‘SECPKG_ATTR_DTLS_MTU’ undeclared (first use in this function); did you mean ‘SECPKG_ATTR_TARGET’?
 1016 |         sspi_ret = SetContextAttributes(&c->ctxt_handle, SECPKG_ATTR_DTLS_MTU, &mtu, sizeof(mtu));
      |                                                          ^~~~~~~~~~~~~~~~~~~~
      |                                                          SECPKG_ATTR_TARGET
src/libavformat/tls_schannel.c: In function ‘tls_open’:
src/libavformat/tls_schannel.c:1072:51: error: ‘SP_PROT_DTLS1_X_SERVER’ undeclared (first use in this function); did you mean ‘SP_PROT_TLS1_SERVER’?
 1072 |             schannel_cred.grbitEnabledProtocols = SP_PROT_DTLS1_X_SERVER;
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~
      |                                                   SP_PROT_TLS1_SERVER
src/libavformat/tls_schannel.c:1083:51: error: ‘SP_PROT_DTLS1_X_CLIENT’ undeclared (first use in this function); did you mean ‘SP_PROT_TLS1_CLIENT’?
 1083 |             schannel_cred.grbitEnabledProtocols = SP_PROT_DTLS1_X_CLIENT;
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~
      |                                                   SP_PROT_TLS1_CLIENT
make: *** [/home/michael/ffmpeg-git/ffmpeg/ffbuild/common.mak:81: libavformat/tls_schannel.o] Error 1
make: *** Waiting for unfinished jobs....
STRIP	libavfilter/x86/colorspacedsp.o

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

       reply	other threads:[~2025-07-13  0:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250711160418.F0282412864@natalya.videolan.org>
2025-07-13  0:32 ` Michael Niedermayer [this message]
2025-07-13  2:59   ` James Almer
2025-07-13  6:33     ` Hendrik Leppkes
2025-07-13 11:36       ` Timo Rothenpieler
2025-07-13 11:35     ` Timo Rothenpieler
2025-07-13 14:12       ` James Almer
2025-07-13 13:55     ` James Almer
2025-07-13 11:34   ` Timo Rothenpieler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250713003257.GA1099245@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git