mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Improve support for loading encrypted private keys
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40139 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
28de617ef6
commit
f9540e172e
8 changed files with 646 additions and 598 deletions
23
Tests/base/GSTLS/basic.m
Normal file
23
Tests/base/GSTLS/basic.m
Normal file
|
@ -0,0 +1,23 @@
|
|||
#import "ObjectTesting.h"
|
||||
#import "../../../Headers/GNUstepBase/config.h"
|
||||
#import "../../../Headers/Foundation/Foundation.h"
|
||||
#ifdef HAVE_GNUTLS
|
||||
#import "../../../Source/GSTLS.h"
|
||||
#endif
|
||||
int
|
||||
main() {
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
START_SET("TLS support")
|
||||
#ifdef HAVE_GNUTLS
|
||||
#ifndef HAVE_GNUTLS_X509_PRIVKEY_IMPORT2
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
GSTLSPrivateKey *k = [GSTLSPrivateKey keyFromFile: @"test.key" withPassword: @"asdf"];
|
||||
PASS(k != nil, "OpenSSL encrypted key can be loaded");
|
||||
#else
|
||||
SKIP("TLS support disabled");
|
||||
#endif
|
||||
END_SET("TLS support");
|
||||
DESTROY(arp);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue