Ross Kinder
1aa2f9374a
Merge pull request #11 from timou/master
...
Fix breakages on Fedora 25
2017-01-16 08:20:12 -05:00
Tim Ebringer
9a878d8e76
Fix breakages on Fedora 25
...
On Fedora 25, tests fail with error
func=xmlSecCryptoAppInit:file=app.c:line=1423:
obj=unknown:subj=cryptoAppInit:error=9:
feature is not implemented:
panic: xmlsec crypto initialization failed.
This appears to be because the pkg-config files set the wrong
CFLAGS defines for cgo, which results in runtime breakage
beacuse OpenSSL isn't properly loaded.
In order to fix how Fedora sets up these packages we want defines
XMLSEC_CRYPTO_OPENSSL set, XMLSEC_CRYPTO_DYNAMIC_LOADING unset
and we want to force linking with xmlsec1-openssl. This change
puts these in cgo directives.
We also fix a test which now has some off-by-one line number
changes in the error message.
2017-01-15 15:59:04 -05:00
Ross Kinder
383e4f2c19
implement native xmlenc decrypt function
2016-12-29 11:13:34 -05:00
Ross Kinder
e02213cf99
add license
...
fixes #9
2016-11-14 08:54:23 -05:00
Ross Kinder
4c0831706e
drop support for go 1.5
2016-10-20 20:23:33 -04:00
Ross Kinder
0c3950cf18
static build: openssl version bump
2016-10-20 20:21:00 -04:00
Ross Kinder
bc5580d29d
use a specific version of ubuntu for static build
2016-10-20 20:20:38 -04:00
Ross Kinder
31c57ffee3
fix go vet complaints
2016-09-03 19:38:58 -04:00
Ross Kinder
154d6b93c0
fix non-static dockerfile
2016-09-03 19:37:55 -04:00
Ross Kinder
db09fcec31
support and describe building static binaries
2016-09-03 19:31:03 -04:00
Ross Kinder
176078f607
update readme, pkg-config is needed on darwin
2016-09-03 10:49:43 -04:00
Ross Kinder
c83ad820f9
run travis against go 1.7
2016-09-03 10:49:24 -04:00
Ross Kinder
760a575a8a
silence warnings on gcc/linux
2016-09-03 10:47:24 -04:00
Ross Kinder
e61c00c496
silence warnings on gcc/linux
2016-09-03 10:46:08 -04:00
Ross Kinder
607d9cc53c
add cgo flag to (finally!) silence build time warnings
2016-09-03 10:42:39 -04:00
Ross Kinder
6c0b1932d3
test with go 1.6
2016-02-19 10:33:37 -05:00
Ross Kinder
2ab6245e33
initialize libxml error capture when we start processing XML on each thread.
2015-12-23 18:54:11 -05:00
Ross Kinder
dc37ddb368
capture errors from libxml2
...
fixes #4
2015-12-23 17:18:02 -05:00
Ross Kinder
c095422255
get rid of un-idiomatic []byte(C.GoStringN(…)) and instead use C.GoBytes()
2015-12-23 15:15:50 -05:00
Ross Kinder
6113cc3d6f
get rid of hacky newDoc2()
2015-12-23 15:09:37 -05:00
Ross Kinder
67af552ad1
move all invocations of CString to globals where the fact that it leaks memory doesn’t matter
...
bug #5
2015-12-23 15:08:21 -05:00
Ross Kinder
064bef37e7
cleanup: add/fix comments
2015-12-23 14:44:38 -05:00
Ross Kinder
25d9ec2994
update readme
2015-12-23 14:26:26 -05:00
Ross Kinder
5b03fd7e58
travis: install golint
2015-12-23 14:15:16 -05:00
Ross Kinder
b31c1472a0
clean up, add documentation, fix lint errors
2015-12-23 14:11:29 -05:00
Ross Kinder
9cc70cf455
generalize expected error messages from libxmlsec
2015-12-23 12:09:17 -05:00
Ross Kinder
cccbc3e05b
fix getting the current thread on linux & mac
2015-12-23 12:07:04 -05:00
Ross Kinder
b390a3e30a
progress: enable xmldsig and do other cleanups
2015-12-23 11:31:54 -05:00
Ross Kinder
45f8aa9eeb
refactor:
...
- merge xmldsig and xmlenc into a single package
- implement thread-safe error capture
- implement encryption using libxmlsec, discarding the go implementation
2015-12-23 10:47:07 -05:00
Ross Kinder
004226098f
remove coveralls (it doesn't work/isn't worth it right now)
2015-11-30 20:46:02 -05:00
Ross Kinder
9f3ed8331d
add coveralls trigger
2015-11-30 20:38:16 -05:00
Ross Kinder
dcd29e8f67
xmlenc: add tests
2015-11-30 20:35:34 -05:00
Ross Kinder
ded02b064c
xmldsig: switch to using gocheck and add tests
2015-11-30 20:14:58 -05:00
Ross Kinder
7f65c2aa7b
xmldsig: add test that we can handle XMLID properly for SAML
2015-11-30 19:16:24 -05:00
Ross Kinder
3564a0cc1c
xmlenc: clear up the confusion about padding bytes and add tests for them
2015-11-30 19:16:01 -05:00
Ross Kinder
1f562a8ad1
update example
2015-11-30 16:53:20 -05:00
Ross Kinder
b0917aaed7
update README
2015-11-30 16:50:15 -05:00
Ross Kinder
f0631d11c8
xmlenc: Decrypt(): return the plaintext directly, don’t modify the source document.
2015-11-30 16:49:52 -05:00
Ross Kinder
a4571e8fd9
add support for specifying xml:id
2015-11-30 16:45:21 -05:00
Ross Kinder
af25076327
xmlenc: update test expectations for [ 83e3403ae1]
2015-11-30 15:37:51 -05:00
Ross Kinder
eb87bfef60
xmldsig: merge newContext into Sign() because that is the only caller, simplify implementation
2015-11-30 15:36:00 -05:00
Ross Kinder
83e3403ae1
xmlenc: strip weird trailing 0x01 byte found in SAML responses when decrypting (HACK)
2015-11-30 15:31:17 -05:00
Ross Kinder
c9c47bc396
xmldsig: add support for verifying signatures with a certificate (rather than the RSA private key)
2015-11-30 15:30:53 -05:00
Ross Kinder
720544b231
xmlenc: remove model.go which is not needed
2015-11-29 21:49:57 -05:00
Ross Kinder
84a6b8b42b
xmlenc: add support for decryption
2015-11-29 21:49:26 -05:00
Ross Kinder
83593a6168
initial (broken) implementation of xmlenc
2015-10-21 15:07:57 -04:00
Ross Kinder
ec5ce6bec4
fix style nit
2015-10-06 12:42:23 -04:00
Ross Kinder
9af32b3cac
merge
2015-10-06 12:42:03 -04:00
Ross Kinder
966c9d115a
add a Signature struct that can be used to make Signature templates
2015-10-06 12:41:35 -04:00
Ross Kinder
673471166f
fix Sign/Verify to take byte slices not strings
2015-10-06 12:41:06 -04:00