Skip to content

Commit 1346f6d

Browse files
authored
Merge pull request #154 from hoefling/aes-gcm
Add transform constants for AES-GCM
2 parents 39c3bca + 2a6cd99 commit 1346f6d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/constants.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,12 @@ int PyXmlSec_ConstantsModule_Init(PyObject* package) {
543543
PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformSha384, "SHA384");
544544
PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformSha512, "SHA512");
545545

546+
#if XMLSEC_VERSION_HEX > 315
547+
PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformAes128Gcm, "AES128_GCM");
548+
PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformAes192Gcm, "AES192_GCM");
549+
PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformAes256Gcm, "AES256_GCM");
550+
#endif
551+
546552
PYXMLSEC_CLOSE_NAMESPACE(transformCls);
547553

548554
#undef PYXMLSEC_ADD_TRANSFORM_CONSTANT

src/xmlsec/constants.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ NsExcC14NWithComments: Final = 'http://www.w3.org/2001/10/xml-exc-c14n#WithComme
7979
Soap11Ns: Final = 'http://schemas.xmlsoap.org/soap/envelope/'
8080
Soap12Ns: Final = 'http://www.w3.org/2002/06/soap-envelope'
8181
TransformAes128Cbc: Final = __Transform('aes128-cbc', 'http://www.w3.org/2001/04/xmlenc#aes128-cbc', 16)
82+
TransformAes128Gcm: Final = __Transform('aes128-gcm', 'http://www.w3.org/2009/xmlenc11#aes128-gcm', 16)
8283
TransformAes192Cbc: Final = __Transform('aes192-cbc', 'http://www.w3.org/2001/04/xmlenc#aes192-cbc', 16)
84+
TransformAes192Gcm: Final = __Transform('aes192-gcm', 'http://www.w3.org/2009/xmlenc11#aes192-gcm', 16)
8385
TransformAes256Cbc: Final = __Transform('aes256-cbc', 'http://www.w3.org/2001/04/xmlenc#aes256-cbc', 16)
86+
TransformAes256Gcm: Final = __Transform('aes256-gcm', 'http://www.w3.org/2009/xmlenc11#aes256-gcm', 16)
8487
TransformDes3Cbc: Final = __Transform('tripledes-cbc', 'http://www.w3.org/2001/04/xmlenc#tripledes-cbc', 16)
8588
TransformDsaSha1: Final = __Transform('dsa-sha1', 'http://www.w3.org/2000/09/xmldsig#dsa-sha1', 8)
8689
TransformEcdsaSha1: Final = __Transform('ecdsa-sha1', 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1', 8)

0 commit comments

Comments
 (0)