- 
                Notifications
    
You must be signed in to change notification settings  - Fork 18
 
Closed
Labels
Description
The library provides a C2paSigningAlg enum which presumably should be passed as the alg parameter to the C2paSignerInfo object. However, it raises an exception when I do that:
Traceback (most recent call last):
  File "/Users/daniel/dev/c2pa-python/examples/sign.py", line 47, in <module>
    signer = c2pa.Signer.from_info(signer_info)
  File "/Users/daniel/dev/c2pa-python/venv/lib/python3.13/site-packages/c2pa/c2pa.py", line 1332, in from_info
    raise C2paError(error)
c2pa.c2pa.C2paError: NullParameter: signer_info.algThis is the minimum diff to reproduce the error in examples/sign.py:
diff --git a/examples/sign.py b/examples/sign.py
index 82070b4..7d365e3 100644
--- a/examples/sign.py
+++ b/examples/sign.py
@@ -38,7 +38,7 @@ certs = open(fixtures_dir + "es256_certs.pem", "rb").read()
 key = open(fixtures_dir + "es256_private.key", "rb").read()
 
 signer_info = c2pa.C2paSignerInfo(
-    alg=b"es256",  # Use bytes instead of encoded string
+    alg=c2pa.C2paSigningAlg.ES256,
     sign_cert=certs,
     private_key=key,
     ta_url=b"http://timestamp.digicert.com"  # Use bytes and add timestamp URL