├── .gitignore ├── Classes ├── BookmarksViewController.h ├── BookmarksViewController.m ├── DetailViewController.h ├── DetailViewController.m ├── DocSet.h ├── DocSet.m ├── DocSetDownloadManager.h ├── DocSetDownloadManager.m ├── DocSetViewController.h ├── DocSetViewController.m ├── DocSetsAppDelegate.h ├── DocSetsAppDelegate.m ├── DownloadViewController.h ├── DownloadViewController.m ├── OutlineViewController.h ├── OutlineViewController.m ├── RootViewController.h ├── RootViewController.m ├── SwipeSplitViewController.h └── SwipeSplitViewController.m ├── DocSets.xcodeproj └── project.pbxproj ├── Images ├── Back.png ├── Back@2x.png ├── BookIcon.png ├── BookIcon@2x.png ├── Class.png ├── Class@2x.png ├── Const.png ├── Const@2x.png ├── Default-Landscape~ipad.png ├── Default-Portrait~ipad.png ├── Default~iphone.png ├── Default~iphone@2x.png ├── DocSet.png ├── DocSet@2x.png ├── Enum.png ├── Enum@2x.png ├── Field.png ├── Field@2x.png ├── Forward.png ├── Forward@2x.png ├── Function.png ├── Function@2x.png ├── Global.png ├── Global@2x.png ├── Icon114.png ├── Icon57.png ├── Icon72.png ├── Local.png ├── Local@2x.png ├── Macro.png ├── Macro@2x.png ├── Member.png ├── Member@2x.png ├── Outline.png ├── Outline@2x.png ├── OutlineDisclosureButton.png ├── OutlineDisclosureButton@2x.png ├── Property.png ├── Property@2x.png ├── Protocol.png ├── Protocol@2x.png ├── ReferenceIcon.png ├── ReferenceIcon@2x.png ├── SampleCodeIcon.png ├── SampleCodeIcon@2x.png ├── Shadow.png ├── Struct.png ├── Struct@2x.png ├── Type.png ├── Type@2x.png ├── iTunesArtwork └── whitey.png ├── OtherSources ├── DocSets_Prefix.pch ├── lib │ ├── include │ │ └── openssl │ │ │ ├── aes.h │ │ │ ├── asn1.h │ │ │ ├── asn1_mac.h │ │ │ ├── asn1t.h │ │ │ ├── bio.h │ │ │ ├── blowfish.h │ │ │ ├── bn.h │ │ │ ├── buffer.h │ │ │ ├── camellia.h │ │ │ ├── cast.h │ │ │ ├── cms.h │ │ │ ├── comp.h │ │ │ ├── conf.h │ │ │ ├── conf_api.h │ │ │ ├── crypto.h │ │ │ ├── des.h │ │ │ ├── des_old.h │ │ │ ├── dh.h │ │ │ ├── dsa.h │ │ │ ├── dso.h │ │ │ ├── dtls1.h │ │ │ ├── e_os2.h │ │ │ ├── ebcdic.h │ │ │ ├── ec.h │ │ │ ├── ecdh.h │ │ │ ├── ecdsa.h │ │ │ ├── engine.h │ │ │ ├── err.h │ │ │ ├── evp.h │ │ │ ├── hmac.h │ │ │ ├── idea.h │ │ │ ├── krb5_asn.h │ │ │ ├── kssl.h │ │ │ ├── lhash.h │ │ │ ├── md4.h │ │ │ ├── md5.h │ │ │ ├── mdc2.h │ │ │ ├── modes.h │ │ │ ├── obj_mac.h │ │ │ ├── objects.h │ │ │ ├── ocsp.h │ │ │ ├── opensslconf.h │ │ │ ├── opensslv.h │ │ │ ├── ossl_typ.h │ │ │ ├── pem.h │ │ │ ├── pem2.h │ │ │ ├── pkcs12.h │ │ │ ├── pkcs7.h │ │ │ ├── pqueue.h │ │ │ ├── rand.h │ │ │ ├── rc2.h │ │ │ ├── rc4.h │ │ │ ├── ripemd.h │ │ │ ├── rsa.h │ │ │ ├── safestack.h │ │ │ ├── seed.h │ │ │ ├── sha.h │ │ │ ├── ssl.h │ │ │ ├── ssl2.h │ │ │ ├── ssl23.h │ │ │ ├── ssl3.h │ │ │ ├── stack.h │ │ │ ├── symhacks.h │ │ │ ├── tls1.h │ │ │ ├── ts.h │ │ │ ├── txt_db.h │ │ │ ├── ui.h │ │ │ ├── ui_compat.h │ │ │ ├── whrlpool.h │ │ │ ├── x509.h │ │ │ ├── x509_vfy.h │ │ │ └── x509v3.h │ ├── libcrypto.a │ └── xar │ │ ├── appledouble.h │ │ ├── archive.c │ │ ├── archive.h │ │ ├── arcmod.c │ │ ├── arcmod.h │ │ ├── asprintf.h │ │ ├── b64.c │ │ ├── b64.h │ │ ├── bzxar.c │ │ ├── bzxar.h │ │ ├── config.h │ │ ├── darwinattr.c │ │ ├── darwinattr.h │ │ ├── data.c │ │ ├── data.h │ │ ├── ea.c │ │ ├── ea.h │ │ ├── err.c │ │ ├── ext2.c │ │ ├── ext2.h │ │ ├── fbsdattr.c │ │ ├── fbsdattr.h │ │ ├── filetree.c │ │ ├── filetree.h │ │ ├── hash.c │ │ ├── hash.h │ │ ├── io.c │ │ ├── io.h │ │ ├── linuxattr.c │ │ ├── linuxattr.h │ │ ├── macho.c │ │ ├── macho.h │ │ ├── script.c │ │ ├── script.h │ │ ├── signature.c │ │ ├── signature.h │ │ ├── stat.c │ │ ├── stat.h │ │ ├── subdoc.c │ │ ├── subdoc.h │ │ ├── util.c │ │ ├── util.h │ │ ├── xar.h │ │ ├── zxar.c │ │ └── zxar.h └── main.m ├── README.md ├── Resources ├── AvailableDocSets.plist ├── Info.plist └── docSet.mom └── Screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.xcodeproj/*.pbxuser 3 | *.xcodeproj/*.perspectivev3 4 | *.xcodeproj/xcuserdata 5 | .DS_Store 6 | .swp 7 | ~.nib 8 | .pbxuser 9 | .perspective 10 | *.perspectivev3 11 | *.mode1v3 12 | *.xcworkspacedata 13 | *.xcuserstate 14 | *xcuserdata* 15 | -------------------------------------------------------------------------------- /Classes/BookmarksViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BookmarksViewController.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 26.01.12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DocSet, DetailViewController; 12 | 13 | @interface BookmarksViewController : UITableViewController { 14 | 15 | DocSet *docSet; 16 | __weak DetailViewController *detailViewController; 17 | } 18 | 19 | @property (nonatomic, weak) DetailViewController *detailViewController; 20 | 21 | - (id)initWithDocSet:(DocSet *)selectedDocSet; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Classes/BookmarksViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BookmarksViewController.m 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 26.01.12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "BookmarksViewController.h" 10 | #import "DetailViewController.h" 11 | #import "DocSet.h" 12 | 13 | @implementation BookmarksViewController 14 | 15 | @synthesize detailViewController; 16 | 17 | - (id)initWithDocSet:(DocSet *)selectedDocSet 18 | { 19 | self = [super initWithStyle:UITableViewStyleGrouped]; 20 | if (self) { 21 | self.title = NSLocalizedString(@"Bookmarks", nil); 22 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { 23 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done:)]; 24 | self.navigationItem.leftBarButtonItem = [self editButtonItem]; 25 | } else { 26 | self.contentSizeForViewInPopover = CGSizeMake(320, 480); 27 | self.navigationItem.rightBarButtonItem = [self editButtonItem]; 28 | } 29 | docSet = selectedDocSet; 30 | } 31 | return self; 32 | } 33 | 34 | - (void)viewDidLoad 35 | { 36 | [super viewDidLoad]; 37 | } 38 | 39 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 40 | { 41 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 42 | return YES; 43 | } 44 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 45 | } 46 | 47 | - (void)done:(id)sender 48 | { 49 | [self dismissModalViewControllerAnimated:YES]; 50 | } 51 | 52 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 53 | { 54 | return 1; 55 | } 56 | 57 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 58 | { 59 | return [[docSet bookmarks] count]; 60 | } 61 | 62 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 63 | { 64 | static NSString *CellIdentifier = @"Cell"; 65 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 66 | if (cell == nil) { 67 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 68 | cell.textLabel.minimumFontSize = 13.0; 69 | cell.textLabel.adjustsFontSizeToFitWidth = YES; 70 | } 71 | 72 | NSDictionary *bookmark = [[docSet bookmarks] objectAtIndex:indexPath.row]; 73 | cell.textLabel.text = [bookmark objectForKey:@"title"]; 74 | 75 | return cell; 76 | } 77 | 78 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 79 | { 80 | if (editingStyle == UITableViewCellEditingStyleDelete) { 81 | // Delete the row from the data source 82 | [[docSet bookmarks] removeObjectAtIndex:indexPath.row]; 83 | [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; 84 | [docSet saveBookmarks]; 85 | } 86 | } 87 | 88 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath 89 | { 90 | if (toIndexPath.row != fromIndexPath.row) { 91 | NSDictionary *movedBookmark = [[docSet bookmarks] objectAtIndex:fromIndexPath.row]; 92 | [[docSet bookmarks] removeObjectAtIndex:fromIndexPath.row]; 93 | if (toIndexPath.row >= [[docSet bookmarks] count]) { 94 | [[docSet bookmarks] addObject:movedBookmark]; 95 | } else { 96 | [[docSet bookmarks] insertObject:movedBookmark atIndex:toIndexPath.row]; 97 | } 98 | [docSet saveBookmarks]; 99 | } 100 | } 101 | 102 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 103 | { 104 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 105 | NSDictionary *selectedBookmark = [[docSet bookmarks] objectAtIndex:indexPath.row]; 106 | [self.detailViewController showBookmark:selectedBookmark]; 107 | } 108 | 109 | @end 110 | -------------------------------------------------------------------------------- /Classes/DetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 05.12.10. 6 | // Copyright 2010 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DocSet, OutlineItem, OutlineViewController; 12 | 13 | @interface DetailViewController : UIViewController { 14 | 15 | UIActionSheet *activeSheet; 16 | UIPopoverController *outlinePopover; 17 | UIViewController *outlineViewController; 18 | UIPopoverController *bookmarksPopover; 19 | 20 | NSArray *portraitToolbarItems; 21 | NSArray *landscapeToolbarItems; 22 | 23 | UIToolbar *toolbar; 24 | UIBarButtonItem *backButtonItem; 25 | UIBarButtonItem *forwardButtonItem; 26 | UIBarButtonItem *outlineButtonItem; 27 | UIBarButtonItem *bookmarksButtonItem; 28 | UIBarButtonItem *actionButtonItem; 29 | UILabel *titleLabel; 30 | 31 | UIView *coverView; 32 | UIWebView *webView; 33 | 34 | DocSet *docSet; 35 | NSDictionary *book; 36 | NSString *bookPath; 37 | NSURL *selectedExternalLinkURL; 38 | } 39 | 40 | @property (nonatomic, strong) DocSet *docSet; 41 | @property (nonatomic, strong) NSURL *currentURL; 42 | 43 | - (void)showNode:(NSManagedObject *)node inDocSet:(DocSet *)docSet; 44 | - (void)showToken:(NSDictionary *)tokenInfo inDocSet:(DocSet *)docSet; 45 | - (void)showOutlineItem:(OutlineItem *)outlineItem; 46 | - (void)showBookmark:(NSDictionary *)bookmark; 47 | - (void)openURL:(NSURL *)URL withAnchor:(NSString *)a; 48 | - (NSString *)bookPathForURL:(NSURL *)URL; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Classes/DocSet.h: -------------------------------------------------------------------------------- 1 | // 2 | // DocSet.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 05.12.10. 6 | // Copyright 2010 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define DocSetWillBeDeletedNotification @"DocSetWillBeDeletedNotification" 12 | 13 | #define kNodeSectionNodes @"nodes" 14 | #define kNodeSectionTitle @"title" 15 | 16 | typedef void(^DocSetSearchCompletionHandler)(NSString *searchTerm, NSArray *results); 17 | 18 | @interface DocSet : NSObject { 19 | 20 | NSString *path; 21 | NSString *title; 22 | NSString *copyright; 23 | NSURL *fallbackURL; 24 | 25 | NSManagedObjectContext *managedObjectContext; 26 | NSPersistentStoreCoordinator *persistentStoreCoordinator; 27 | 28 | dispatch_queue_t searchQueue; 29 | BOOL loadingTokens; 30 | NSArray *tokens; 31 | NSArray *nodeInfos; 32 | 33 | NSMutableArray *bookmarks; 34 | } 35 | 36 | @property (nonatomic, strong, readonly) NSString *path; 37 | @property (nonatomic, strong, readonly) NSString *title; 38 | @property (nonatomic, strong, readonly) NSString *copyright; 39 | @property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext; 40 | @property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; 41 | @property (nonatomic, strong, readonly) NSMutableArray *bookmarks; 42 | 43 | - (id)initWithPath:(NSString *)docSetPath; 44 | - (NSArray *)nodeSectionsForRootNode:(NSManagedObject *)rootNode; 45 | - (BOOL)nodeIsExpandable:(NSManagedObject *)node; 46 | - (void)saveBookmarks; 47 | - (void)prepareSearch; 48 | - (void)searchForNodesMatching:(NSString *)searchTerm completion:(DocSetSearchCompletionHandler)completion; 49 | - (void)searchForTokensMatching:(NSString *)searchTerm completion:(DocSetSearchCompletionHandler)completion; 50 | 51 | - (NSURL *)URLForNode:(NSManagedObject *)node; 52 | - (NSURL *)webURLForNode:(NSManagedObject *)node; 53 | - (NSURL *)webURLForLocalURL:(NSURL *)localURL; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Classes/DocSetDownloadManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // DocSetDownloadManager.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 22.01.12. 6 | // Copyright (c) 2012 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define DocSetDownloadManagerStartedDownloadNotification @"DocSetDownloadManagerStartedDownloadNotification" 12 | #define DocSetDownloadManagerUpdatedDocSetsNotification @"DocSetDownloadManagerUpdatedDocSetsNotification" 13 | #define DocSetDownloadFinishedNotification @"DocSetDownloadFinishedNotification" 14 | 15 | @class DocSet, DocSetDownload; 16 | 17 | @interface DocSetDownloadManager : NSObject { 18 | 19 | NSArray *_downloadedDocSets; 20 | NSSet *_downloadedDocSetNames; 21 | 22 | NSArray *_availableDownloads; 23 | NSMutableDictionary *_downloadsByURL; 24 | DocSetDownload *_currentDownload; 25 | NSMutableArray *_downloadQueue; 26 | } 27 | 28 | @property (nonatomic, strong) NSArray *downloadedDocSets; 29 | @property (nonatomic, strong) NSSet *downloadedDocSetNames; 30 | @property (nonatomic, strong) NSArray *availableDownloads; 31 | @property (nonatomic, strong) DocSetDownload *currentDownload; 32 | 33 | + (id)sharedDownloadManager; 34 | - (void)downloadDocSetAtURL:(NSString *)URL; 35 | - (void)deleteDocSet:(DocSet *)docSetToDelete; 36 | - (DocSetDownload *)downloadForURL:(NSString *)URL; 37 | - (DocSet *)downloadedDocSetWithName:(NSString *)docSetName; 38 | 39 | @end 40 | 41 | 42 | typedef enum DocSetDownloadStatus { 43 | DocSetDownloadStatusWaiting = 0, 44 | DocSetDownloadStatusDownloading, 45 | DocSetDownloadStatusExtracting, 46 | DocSetDownloadStatusFinished 47 | } DocSetDownloadStatus; 48 | 49 | @interface DocSetDownload : NSObject { 50 | 51 | UIBackgroundTaskIdentifier _backgroundTask; 52 | NSURL *_URL; 53 | NSURLConnection *_connection; 54 | NSFileHandle *_fileHandle; 55 | NSString *_downloadTargetPath; 56 | NSString *_extractedPath; 57 | 58 | DocSetDownloadStatus _status; 59 | float _progress; 60 | NSUInteger bytesDownloaded; 61 | NSInteger downloadSize; 62 | } 63 | 64 | @property (nonatomic, strong) NSURL *URL; 65 | @property (nonatomic, strong) NSFileHandle *fileHandle; 66 | @property (nonatomic, strong) NSURLConnection *connection; 67 | @property (strong) NSString *downloadTargetPath; 68 | @property (nonatomic, strong) NSString *extractedPath; 69 | @property (nonatomic, assign) DocSetDownloadStatus status; 70 | @property (nonatomic, assign) float progress; 71 | @property (readonly) NSUInteger bytesDownloaded; 72 | @property (readonly) NSInteger downloadSize; 73 | 74 | - (id)initWithURL:(NSURL *)URL; 75 | - (void)start; 76 | - (void)fail; 77 | 78 | @end -------------------------------------------------------------------------------- /Classes/DocSetViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DocSetViewController.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 05.12.10. 6 | // Copyright 2010 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DocSet, DetailViewController; 12 | 13 | @interface DocSetViewController : UITableViewController { 14 | 15 | DetailViewController *detailViewController; 16 | DocSet *docSet; 17 | NSArray *nodeSections; 18 | NSArray *searchResults; 19 | UISearchDisplayController *searchDisplayController; 20 | NSDictionary *iconsByTokenType; 21 | } 22 | 23 | @property (nonatomic, strong) DocSet *docSet; 24 | @property (nonatomic, strong) NSManagedObject *rootNode; 25 | @property (nonatomic, strong) DetailViewController *detailViewController; 26 | @property (nonatomic, strong) NSArray *searchResults; 27 | @property (nonatomic, strong) UISearchDisplayController *searchDisplayController; 28 | 29 | - (id)initWithDocSet:(DocSet *)set rootNode:(NSManagedObject *)rootNode; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/DocSetsAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // DocPadAppDelegate.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 05.12.10. 6 | // Copyright 2010 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @class RootViewController, DetailViewController, SwipeSplitViewController; 13 | 14 | @interface DocSetsAppDelegate : NSObject { 15 | 16 | UIWindow *window; 17 | SwipeSplitViewController *splitViewController; 18 | RootViewController *rootViewController; 19 | UINavigationController *rootNavigationController; 20 | DetailViewController *detailViewController; 21 | } 22 | 23 | @property (nonatomic, strong) UIWindow *window; 24 | @property (nonatomic, strong) SwipeSplitViewController *splitViewController; 25 | @property (nonatomic, strong) RootViewController *rootViewController; 26 | @property (nonatomic, strong) DetailViewController *detailViewController; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Classes/DownloadViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DownloadViewController.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 22.01.12. 6 | // Copyright (c) 2012 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DownloadViewController : UITableViewController { 12 | 13 | } 14 | 15 | @end 16 | 17 | 18 | @class DocSetDownload; 19 | @interface DownloadCell : UITableViewCell { 20 | NSDictionary *_downloadInfo; 21 | DocSetDownload *_download; 22 | UIProgressView *_progressView; 23 | } 24 | 25 | @property (nonatomic, strong) NSDictionary *downloadInfo; 26 | @property (nonatomic, strong) DocSetDownload *download; 27 | @property (nonatomic, strong) UIProgressView *progressView; 28 | 29 | - (void)updateStatusLabel; 30 | 31 | @end -------------------------------------------------------------------------------- /Classes/OutlineViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OutlineViewController.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 06.12.10. 6 | // Copyright 2010 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DetailViewController, OutlineItem; 12 | 13 | @interface OutlineViewController : UITableViewController { 14 | 15 | OutlineItem *rootItem; 16 | NSArray *visibleItems; 17 | __weak DetailViewController *detailViewController; 18 | } 19 | 20 | @property (nonatomic, weak) DetailViewController *detailViewController; 21 | @property (nonatomic, strong) NSArray *visibleItems; 22 | 23 | - (id)initWithItems:(NSArray *)outlineItems title:(NSString *)outlineTitle; 24 | 25 | @end 26 | 27 | 28 | @interface OutlineItem : NSObject { 29 | NSString *title; 30 | NSString *aref; 31 | NSString *href; 32 | NSArray *children; 33 | BOOL expanded; 34 | int level; 35 | } 36 | 37 | @property (nonatomic) BOOL expanded; 38 | @property (nonatomic, strong, readonly) NSString *title; 39 | @property (nonatomic, strong, readonly) NSString *aref; 40 | @property (nonatomic, strong, readonly) NSString *href; 41 | @property (nonatomic, readonly) int level; 42 | @property (nonatomic, strong, readonly) NSArray *children; 43 | 44 | - (id)initWithDictionary:(NSDictionary *)outlineInfo level:(int)outlineLevel; 45 | - (NSArray *)flattenedChildren; 46 | - (void)addOpenChildren:(NSMutableArray *)list; 47 | 48 | @end 49 | 50 | 51 | @interface OutlineCell : UITableViewCell { 52 | __weak id delegate; 53 | OutlineItem *outlineItem; 54 | UIButton *outlineDisclosureButton; 55 | } 56 | 57 | @property (nonatomic, weak) id delegate; 58 | @property (nonatomic, strong) OutlineItem *outlineItem; 59 | 60 | @end 61 | 62 | 63 | @interface NSObject (OutlineCellDelegate) 64 | 65 | - (void)outlineCellDidTapDisclosureButton:(OutlineCell *)cell; 66 | 67 | @end -------------------------------------------------------------------------------- /Classes/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 05.12.10. 6 | // Copyright 2010 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DetailViewController; 12 | 13 | @interface RootViewController : UITableViewController { 14 | 15 | DetailViewController *detailViewController; 16 | } 17 | 18 | @property (nonatomic, strong) DetailViewController *detailViewController; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/RootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.m 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 05.12.10. 6 | // Copyright 2010 omz:software. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | #import "DetailViewController.h" 11 | #import "DocSetViewController.h" 12 | #import "DownloadViewController.h" 13 | #import "DocSetDownloadManager.h" 14 | #import "DocSet.h" 15 | 16 | @implementation RootViewController 17 | 18 | @synthesize detailViewController; 19 | 20 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 21 | { 22 | self = [super initWithNibName:nil bundle:nil]; 23 | self.title = NSLocalizedString(@"DocSets",nil); 24 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(docSetsChanged:) name:DocSetDownloadManagerUpdatedDocSetsNotification object:nil]; 25 | return self; 26 | } 27 | 28 | - (void)viewDidLoad 29 | { 30 | [super viewDidLoad]; 31 | self.tableView.backgroundColor = [UIColor colorWithWhite:0.96 alpha:1.0]; 32 | self.clearsSelectionOnViewWillAppear = YES; 33 | self.contentSizeForViewInPopover = CGSizeMake(400.0, 1024.0); 34 | self.tableView.rowHeight = 64.0; 35 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addDocSet:)]; 36 | self.navigationItem.rightBarButtonItem = [self editButtonItem]; 37 | } 38 | 39 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 40 | { 41 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 42 | return YES; 43 | } 44 | return interfaceOrientation == UIInterfaceOrientationPortrait; 45 | } 46 | 47 | #pragma mark - 48 | 49 | - (void)addDocSet:(id)sender 50 | { 51 | DownloadViewController *vc = [[DownloadViewController alloc] initWithStyle:UITableViewStyleGrouped]; 52 | UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:vc]; 53 | navController.modalPresentationStyle = UIModalPresentationFormSheet; 54 | [self presentModalViewController:navController animated:YES]; 55 | } 56 | 57 | - (void)docSetsChanged:(NSNotification *)notification 58 | { 59 | if (!self.editing) { 60 | [self.tableView reloadData]; 61 | } 62 | } 63 | 64 | #pragma mark - 65 | 66 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)aTableView 67 | { 68 | return 1; 69 | } 70 | 71 | 72 | - (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section 73 | { 74 | return [[[DocSetDownloadManager sharedDownloadManager] downloadedDocSets] count]; 75 | } 76 | 77 | 78 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 79 | { 80 | static NSString *CellIdentifier = @"CellIdentifier"; 81 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 82 | if (cell == nil) { 83 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; 84 | cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 85 | cell.imageView.image = [UIImage imageNamed:@"DocSet.png"]; 86 | } 87 | 88 | DocSet *docSet = [[[DocSetDownloadManager sharedDownloadManager] downloadedDocSets] objectAtIndex:indexPath.row]; 89 | cell.textLabel.text = docSet.title; 90 | cell.detailTextLabel.text = docSet.copyright; 91 | 92 | return cell; 93 | } 94 | 95 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 96 | { 97 | if (editingStyle == UITableViewCellEditingStyleDelete) { 98 | DocSet *docSetToDelete = [[[DocSetDownloadManager sharedDownloadManager] downloadedDocSets] objectAtIndex:indexPath.row]; 99 | [[DocSetDownloadManager sharedDownloadManager] deleteDocSet:docSetToDelete]; 100 | [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; 101 | } 102 | } 103 | 104 | - (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 105 | { 106 | DocSet *selectedDocSet = [[[DocSetDownloadManager sharedDownloadManager] downloadedDocSets] objectAtIndex:indexPath.row]; 107 | DocSetViewController *docSetViewController = [[DocSetViewController alloc] initWithDocSet:selectedDocSet rootNode:nil]; 108 | docSetViewController.detailViewController = self.detailViewController; 109 | [self.navigationController pushViewController:docSetViewController animated:YES]; 110 | 111 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && !self.detailViewController.docSet) { 112 | //enables the bookmarks button 113 | self.detailViewController.docSet = selectedDocSet; 114 | } 115 | } 116 | 117 | #pragma mark - 118 | 119 | - (void)dealloc 120 | { 121 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 122 | } 123 | 124 | 125 | @end 126 | 127 | -------------------------------------------------------------------------------- /Classes/SwipeSplitViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwipeSplitViewController.h 3 | // SwipeSplitTest 4 | // 5 | // Created by Ole Zorn on 23.01.12. 6 | // Copyright (c) 2012 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SwipeSplitViewController : UIViewController { 12 | 13 | UIImageView *_masterContainerView; 14 | UIViewController *_masterViewController; 15 | UIViewController *_detailViewController; 16 | 17 | UIView *_shieldView; 18 | } 19 | 20 | @property (nonatomic, strong) UIImageView *masterContainerView; 21 | @property (nonatomic, strong, readonly) UIViewController *masterViewController; 22 | @property (nonatomic, strong, readonly) UIViewController *detailViewController; 23 | @property (nonatomic, strong) UIView *shieldView; 24 | 25 | - (id)initWithMasterViewController:(UIViewController *)masterVC detailViewController:(UIViewController *)detailVC; 26 | - (void)showMasterViewControllerAnimated:(BOOL)animated; 27 | - (void)hideMasterViewControllerAnimated:(BOOL)animated; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Images/Back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Back.png -------------------------------------------------------------------------------- /Images/Back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Back@2x.png -------------------------------------------------------------------------------- /Images/BookIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/BookIcon.png -------------------------------------------------------------------------------- /Images/BookIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/BookIcon@2x.png -------------------------------------------------------------------------------- /Images/Class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Class.png -------------------------------------------------------------------------------- /Images/Class@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Class@2x.png -------------------------------------------------------------------------------- /Images/Const.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Const.png -------------------------------------------------------------------------------- /Images/Const@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Const@2x.png -------------------------------------------------------------------------------- /Images/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /Images/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /Images/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Default~iphone.png -------------------------------------------------------------------------------- /Images/Default~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Default~iphone@2x.png -------------------------------------------------------------------------------- /Images/DocSet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/DocSet.png -------------------------------------------------------------------------------- /Images/DocSet@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/DocSet@2x.png -------------------------------------------------------------------------------- /Images/Enum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Enum.png -------------------------------------------------------------------------------- /Images/Enum@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Enum@2x.png -------------------------------------------------------------------------------- /Images/Field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Field.png -------------------------------------------------------------------------------- /Images/Field@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Field@2x.png -------------------------------------------------------------------------------- /Images/Forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Forward.png -------------------------------------------------------------------------------- /Images/Forward@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Forward@2x.png -------------------------------------------------------------------------------- /Images/Function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Function.png -------------------------------------------------------------------------------- /Images/Function@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Function@2x.png -------------------------------------------------------------------------------- /Images/Global.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Global.png -------------------------------------------------------------------------------- /Images/Global@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Global@2x.png -------------------------------------------------------------------------------- /Images/Icon114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Icon114.png -------------------------------------------------------------------------------- /Images/Icon57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Icon57.png -------------------------------------------------------------------------------- /Images/Icon72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Icon72.png -------------------------------------------------------------------------------- /Images/Local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Local.png -------------------------------------------------------------------------------- /Images/Local@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Local@2x.png -------------------------------------------------------------------------------- /Images/Macro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Macro.png -------------------------------------------------------------------------------- /Images/Macro@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Macro@2x.png -------------------------------------------------------------------------------- /Images/Member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Member.png -------------------------------------------------------------------------------- /Images/Member@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Member@2x.png -------------------------------------------------------------------------------- /Images/Outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Outline.png -------------------------------------------------------------------------------- /Images/Outline@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Outline@2x.png -------------------------------------------------------------------------------- /Images/OutlineDisclosureButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/OutlineDisclosureButton.png -------------------------------------------------------------------------------- /Images/OutlineDisclosureButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/OutlineDisclosureButton@2x.png -------------------------------------------------------------------------------- /Images/Property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Property.png -------------------------------------------------------------------------------- /Images/Property@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Property@2x.png -------------------------------------------------------------------------------- /Images/Protocol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Protocol.png -------------------------------------------------------------------------------- /Images/Protocol@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Protocol@2x.png -------------------------------------------------------------------------------- /Images/ReferenceIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/ReferenceIcon.png -------------------------------------------------------------------------------- /Images/ReferenceIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/ReferenceIcon@2x.png -------------------------------------------------------------------------------- /Images/SampleCodeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/SampleCodeIcon.png -------------------------------------------------------------------------------- /Images/SampleCodeIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/SampleCodeIcon@2x.png -------------------------------------------------------------------------------- /Images/Shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Shadow.png -------------------------------------------------------------------------------- /Images/Struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Struct.png -------------------------------------------------------------------------------- /Images/Struct@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Struct@2x.png -------------------------------------------------------------------------------- /Images/Type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Type.png -------------------------------------------------------------------------------- /Images/Type@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/Type@2x.png -------------------------------------------------------------------------------- /Images/iTunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/iTunesArtwork -------------------------------------------------------------------------------- /Images/whitey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Images/whitey.png -------------------------------------------------------------------------------- /OtherSources/DocSets_Prefix.pch: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | #ifndef __IPHONE_3_2 5 | #warning "This project uses features only available in iPhone SDK 3.2 and later." 6 | #endif 7 | 8 | 9 | #ifdef __OBJC__ 10 | #import 11 | #import 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | /* crypto/bf/blowfish.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_BLOWFISH_H 60 | #define HEADER_BLOWFISH_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #ifdef OPENSSL_NO_BF 69 | #error BF is disabled. 70 | #endif 71 | 72 | #define BF_ENCRYPT 1 73 | #define BF_DECRYPT 0 74 | 75 | /* 76 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 77 | * ! BF_LONG has to be at least 32 bits wide. If it's wider, then ! 78 | * ! BF_LONG_LOG2 has to be defined along. ! 79 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 80 | */ 81 | 82 | #if defined(__LP32__) 83 | #define BF_LONG unsigned long 84 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 85 | #define BF_LONG unsigned long 86 | #define BF_LONG_LOG2 3 87 | /* 88 | * _CRAY note. I could declare short, but I have no idea what impact 89 | * does it have on performance on none-T3E machines. I could declare 90 | * int, but at least on C90 sizeof(int) can be chosen at compile time. 91 | * So I've chosen long... 92 | * 93 | */ 94 | #else 95 | #define BF_LONG unsigned int 96 | #endif 97 | 98 | #define BF_ROUNDS 16 99 | #define BF_BLOCK 8 100 | 101 | typedef struct bf_key_st 102 | { 103 | BF_LONG P[BF_ROUNDS+2]; 104 | BF_LONG S[4*256]; 105 | } BF_KEY; 106 | 107 | 108 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data); 109 | 110 | void BF_encrypt(BF_LONG *data,const BF_KEY *key); 111 | void BF_decrypt(BF_LONG *data,const BF_KEY *key); 112 | 113 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, 114 | const BF_KEY *key, int enc); 115 | void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 116 | const BF_KEY *schedule, unsigned char *ivec, int enc); 117 | void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, 118 | const BF_KEY *schedule, unsigned char *ivec, int *num, int enc); 119 | void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, 120 | const BF_KEY *schedule, unsigned char *ivec, int *num); 121 | const char *BF_options(void); 122 | 123 | #ifdef __cplusplus 124 | } 125 | #endif 126 | 127 | #endif 128 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | /* crypto/buffer/buffer.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_BUFFER_H 60 | #define HEADER_BUFFER_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #include 69 | 70 | #if !defined(NO_SYS_TYPES_H) 71 | #include 72 | #endif 73 | 74 | /* Already declared in ossl_typ.h */ 75 | /* typedef struct buf_mem_st BUF_MEM; */ 76 | 77 | struct buf_mem_st 78 | { 79 | size_t length; /* current number of bytes */ 80 | char *data; 81 | size_t max; /* size of buffer */ 82 | }; 83 | 84 | BUF_MEM *BUF_MEM_new(void); 85 | void BUF_MEM_free(BUF_MEM *a); 86 | int BUF_MEM_grow(BUF_MEM *str, size_t len); 87 | int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); 88 | char * BUF_strdup(const char *str); 89 | char * BUF_strndup(const char *str, size_t siz); 90 | void * BUF_memdup(const void *data, size_t siz); 91 | void BUF_reverse(unsigned char *out, unsigned char *in, size_t siz); 92 | 93 | /* safe string functions */ 94 | size_t BUF_strlcpy(char *dst,const char *src,size_t siz); 95 | size_t BUF_strlcat(char *dst,const char *src,size_t siz); 96 | 97 | 98 | /* BEGIN ERROR CODES */ 99 | /* The following lines are auto generated by the script mkerr.pl. Any changes 100 | * made after this point may be overwritten when the script is next run. 101 | */ 102 | void ERR_load_BUF_strings(void); 103 | 104 | /* Error codes for the BUF functions. */ 105 | 106 | /* Function codes. */ 107 | #define BUF_F_BUF_MEMDUP 103 108 | #define BUF_F_BUF_MEM_GROW 100 109 | #define BUF_F_BUF_MEM_GROW_CLEAN 105 110 | #define BUF_F_BUF_MEM_NEW 101 111 | #define BUF_F_BUF_STRDUP 102 112 | #define BUF_F_BUF_STRNDUP 104 113 | 114 | /* Reason codes. */ 115 | 116 | #ifdef __cplusplus 117 | } 118 | #endif 119 | #endif 120 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/camellia.h: -------------------------------------------------------------------------------- 1 | /* crypto/camellia/camellia.h -*- mode:C; c-file-style: "eay" -*- */ 2 | /* ==================================================================== 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * 3. All advertising materials mentioning features or use of this 18 | * software must display the following acknowledgment: 19 | * "This product includes software developed by the OpenSSL Project 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 21 | * 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23 | * endorse or promote products derived from this software without 24 | * prior written permission. For written permission, please contact 25 | * openssl-core@openssl.org. 26 | * 27 | * 5. Products derived from this software may not be called "OpenSSL" 28 | * nor may "OpenSSL" appear in their names without prior written 29 | * permission of the OpenSSL Project. 30 | * 31 | * 6. Redistributions of any form whatsoever must retain the following 32 | * acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 35 | * 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. 48 | * ==================================================================== 49 | * 50 | */ 51 | 52 | #ifndef HEADER_CAMELLIA_H 53 | #define HEADER_CAMELLIA_H 54 | 55 | #include 56 | 57 | #ifdef OPENSSL_NO_CAMELLIA 58 | #error CAMELLIA is disabled. 59 | #endif 60 | 61 | #include 62 | 63 | #define CAMELLIA_ENCRYPT 1 64 | #define CAMELLIA_DECRYPT 0 65 | 66 | /* Because array size can't be a const in C, the following two are macros. 67 | Both sizes are in bytes. */ 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | /* This should be a hidden type, but EVP requires that the size be known */ 74 | 75 | #define CAMELLIA_BLOCK_SIZE 16 76 | #define CAMELLIA_TABLE_BYTE_LEN 272 77 | #define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) 78 | 79 | typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match with WORD */ 80 | 81 | struct camellia_key_st 82 | { 83 | union { 84 | double d; /* ensures 64-bit align */ 85 | KEY_TABLE_TYPE rd_key; 86 | } u; 87 | int grand_rounds; 88 | }; 89 | typedef struct camellia_key_st CAMELLIA_KEY; 90 | 91 | int Camellia_set_key(const unsigned char *userKey, const int bits, 92 | CAMELLIA_KEY *key); 93 | 94 | void Camellia_encrypt(const unsigned char *in, unsigned char *out, 95 | const CAMELLIA_KEY *key); 96 | void Camellia_decrypt(const unsigned char *in, unsigned char *out, 97 | const CAMELLIA_KEY *key); 98 | 99 | void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, 100 | const CAMELLIA_KEY *key, const int enc); 101 | void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, 102 | size_t length, const CAMELLIA_KEY *key, 103 | unsigned char *ivec, const int enc); 104 | void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, 105 | size_t length, const CAMELLIA_KEY *key, 106 | unsigned char *ivec, int *num, const int enc); 107 | void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, 108 | size_t length, const CAMELLIA_KEY *key, 109 | unsigned char *ivec, int *num, const int enc); 110 | void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, 111 | size_t length, const CAMELLIA_KEY *key, 112 | unsigned char *ivec, int *num, const int enc); 113 | void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, 114 | size_t length, const CAMELLIA_KEY *key, 115 | unsigned char *ivec, int *num); 116 | void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, 117 | size_t length, const CAMELLIA_KEY *key, 118 | unsigned char ivec[CAMELLIA_BLOCK_SIZE], 119 | unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], 120 | unsigned int *num); 121 | 122 | #ifdef __cplusplus 123 | } 124 | #endif 125 | 126 | #endif /* !HEADER_Camellia_H */ 127 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* crypto/cast/cast.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CAST_H 60 | #define HEADER_CAST_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | #include 67 | 68 | #ifdef OPENSSL_NO_CAST 69 | #error CAST is disabled. 70 | #endif 71 | 72 | #define CAST_ENCRYPT 1 73 | #define CAST_DECRYPT 0 74 | 75 | #define CAST_LONG unsigned int 76 | 77 | #define CAST_BLOCK 8 78 | #define CAST_KEY_LENGTH 16 79 | 80 | typedef struct cast_key_st 81 | { 82 | CAST_LONG data[32]; 83 | int short_key; /* Use reduced rounds for short key */ 84 | } CAST_KEY; 85 | 86 | 87 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 88 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAST_KEY *key, 89 | int enc); 90 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 91 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 92 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 93 | const CAST_KEY *ks, unsigned char *iv, int enc); 94 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 95 | long length, const CAST_KEY *schedule, unsigned char *ivec, 96 | int *num, int enc); 97 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 98 | long length, const CAST_KEY *schedule, unsigned char *ivec, 99 | int *num); 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef HEADER_COMP_H 3 | #define HEADER_COMP_H 4 | 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef struct comp_ctx_st COMP_CTX; 12 | 13 | typedef struct comp_method_st 14 | { 15 | int type; /* NID for compression library */ 16 | const char *name; /* A text string to identify the library */ 17 | int (*init)(COMP_CTX *ctx); 18 | void (*finish)(COMP_CTX *ctx); 19 | int (*compress)(COMP_CTX *ctx, 20 | unsigned char *out, unsigned int olen, 21 | unsigned char *in, unsigned int ilen); 22 | int (*expand)(COMP_CTX *ctx, 23 | unsigned char *out, unsigned int olen, 24 | unsigned char *in, unsigned int ilen); 25 | /* The following two do NOTHING, but are kept for backward compatibility */ 26 | long (*ctrl)(void); 27 | long (*callback_ctrl)(void); 28 | } COMP_METHOD; 29 | 30 | struct comp_ctx_st 31 | { 32 | COMP_METHOD *meth; 33 | unsigned long compress_in; 34 | unsigned long compress_out; 35 | unsigned long expand_in; 36 | unsigned long expand_out; 37 | 38 | CRYPTO_EX_DATA ex_data; 39 | }; 40 | 41 | 42 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 43 | void COMP_CTX_free(COMP_CTX *ctx); 44 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 45 | unsigned char *in, int ilen); 46 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 47 | unsigned char *in, int ilen); 48 | COMP_METHOD *COMP_rle(void ); 49 | COMP_METHOD *COMP_zlib(void ); 50 | void COMP_zlib_cleanup(void); 51 | 52 | #ifdef HEADER_BIO_H 53 | #ifdef ZLIB 54 | BIO_METHOD *BIO_f_zlib(void); 55 | #endif 56 | #endif 57 | 58 | /* BEGIN ERROR CODES */ 59 | /* The following lines are auto generated by the script mkerr.pl. Any changes 60 | * made after this point may be overwritten when the script is next run. 61 | */ 62 | void ERR_load_COMP_strings(void); 63 | 64 | /* Error codes for the COMP functions. */ 65 | 66 | /* Function codes. */ 67 | #define COMP_F_BIO_ZLIB_FLUSH 99 68 | #define COMP_F_BIO_ZLIB_NEW 100 69 | #define COMP_F_BIO_ZLIB_READ 101 70 | #define COMP_F_BIO_ZLIB_WRITE 102 71 | 72 | /* Reason codes. */ 73 | #define COMP_R_ZLIB_DEFLATE_ERROR 99 74 | #define COMP_R_ZLIB_INFLATE_ERROR 100 75 | #define COMP_R_ZLIB_NOT_SUPPORTED 101 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | #endif 81 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* conf_api.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CONF_API_H 60 | #define HEADER_CONF_API_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* Up until OpenSSL 0.9.5a, this was new_section */ 70 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 71 | /* Up until OpenSSL 0.9.5a, this was get_section */ 72 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 73 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 74 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 75 | const char *section); 76 | 77 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 78 | char *_CONF_get_string(const CONF *conf, const char *section, 79 | const char *name); 80 | long _CONF_get_number(const CONF *conf, const char *section, const char *name); 81 | 82 | int _CONF_new_data(CONF *conf); 83 | void _CONF_free_data(CONF *conf); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif 89 | 90 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* crypto/ebcdic.h */ 2 | 3 | #ifndef HEADER_EBCDIC_H 4 | #define HEADER_EBCDIC_H 5 | 6 | #include 7 | 8 | /* Avoid name clashes with other applications */ 9 | #define os_toascii _openssl_os_toascii 10 | #define os_toebcdic _openssl_os_toebcdic 11 | #define ebcdic2ascii _openssl_ebcdic2ascii 12 | #define ascii2ebcdic _openssl_ascii2ebcdic 13 | 14 | extern const unsigned char os_toascii[256]; 15 | extern const unsigned char os_toebcdic[256]; 16 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 17 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* crypto/ecdh/ecdh.h */ 2 | /* ==================================================================== 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 4 | * 5 | * The Elliptic Curve Public-Key Crypto Library (ECC Code) included 6 | * herein is developed by SUN MICROSYSTEMS, INC., and is contributed 7 | * to the OpenSSL project. 8 | * 9 | * The ECC Code is licensed pursuant to the OpenSSL open source 10 | * license provided below. 11 | * 12 | * The ECDH software is originally written by Douglas Stebila of 13 | * Sun Microsystems Laboratories. 14 | * 15 | */ 16 | /* ==================================================================== 17 | * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. 18 | * 19 | * Redistribution and use in source and binary forms, with or without 20 | * modification, are permitted provided that the following conditions 21 | * are met: 22 | * 23 | * 1. Redistributions of source code must retain the above copyright 24 | * notice, this list of conditions and the following disclaimer. 25 | * 26 | * 2. Redistributions in binary form must reproduce the above copyright 27 | * notice, this list of conditions and the following disclaimer in 28 | * the documentation and/or other materials provided with the 29 | * distribution. 30 | * 31 | * 3. All advertising materials mentioning features or use of this 32 | * software must display the following acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 35 | * 36 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 37 | * endorse or promote products derived from this software without 38 | * prior written permission. For written permission, please contact 39 | * licensing@OpenSSL.org. 40 | * 41 | * 5. Products derived from this software may not be called "OpenSSL" 42 | * nor may "OpenSSL" appear in their names without prior written 43 | * permission of the OpenSSL Project. 44 | * 45 | * 6. Redistributions of any form whatsoever must retain the following 46 | * acknowledgment: 47 | * "This product includes software developed by the OpenSSL Project 48 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 49 | * 50 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 51 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 53 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 54 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 56 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 57 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 58 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 59 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 60 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 61 | * OF THE POSSIBILITY OF SUCH DAMAGE. 62 | * ==================================================================== 63 | * 64 | * This product includes cryptographic software written by Eric Young 65 | * (eay@cryptsoft.com). This product includes software written by Tim 66 | * Hudson (tjh@cryptsoft.com). 67 | * 68 | */ 69 | #ifndef HEADER_ECDH_H 70 | #define HEADER_ECDH_H 71 | 72 | #include 73 | 74 | #ifdef OPENSSL_NO_ECDH 75 | #error ECDH is disabled. 76 | #endif 77 | 78 | #include 79 | #include 80 | #ifndef OPENSSL_NO_DEPRECATED 81 | #include 82 | #endif 83 | 84 | #ifdef __cplusplus 85 | extern "C" { 86 | #endif 87 | 88 | const ECDH_METHOD *ECDH_OpenSSL(void); 89 | 90 | void ECDH_set_default_method(const ECDH_METHOD *); 91 | const ECDH_METHOD *ECDH_get_default_method(void); 92 | int ECDH_set_method(EC_KEY *, const ECDH_METHOD *); 93 | 94 | int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, 95 | void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); 96 | 97 | int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new 98 | *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); 99 | int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg); 100 | void *ECDH_get_ex_data(EC_KEY *d, int idx); 101 | 102 | 103 | /* BEGIN ERROR CODES */ 104 | /* The following lines are auto generated by the script mkerr.pl. Any changes 105 | * made after this point may be overwritten when the script is next run. 106 | */ 107 | void ERR_load_ECDH_strings(void); 108 | 109 | /* Error codes for the ECDH functions. */ 110 | 111 | /* Function codes. */ 112 | #define ECDH_F_ECDH_COMPUTE_KEY 100 113 | #define ECDH_F_ECDH_DATA_NEW_METHOD 101 114 | 115 | /* Reason codes. */ 116 | #define ECDH_R_KDF_FAILED 102 117 | #define ECDH_R_NO_PRIVATE_VALUE 100 118 | #define ECDH_R_POINT_ARITHMETIC_FAILURE 101 119 | 120 | #ifdef __cplusplus 121 | } 122 | #endif 123 | #endif 124 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* crypto/hmac/hmac.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | #ifndef HEADER_HMAC_H 59 | #define HEADER_HMAC_H 60 | 61 | #include 62 | 63 | #ifdef OPENSSL_NO_HMAC 64 | #error HMAC is disabled. 65 | #endif 66 | 67 | #include 68 | 69 | #define HMAC_MAX_MD_CBLOCK 128 /* largest known is SHA512 */ 70 | 71 | #ifdef __cplusplus 72 | extern "C" { 73 | #endif 74 | 75 | typedef struct hmac_ctx_st 76 | { 77 | const EVP_MD *md; 78 | EVP_MD_CTX md_ctx; 79 | EVP_MD_CTX i_ctx; 80 | EVP_MD_CTX o_ctx; 81 | unsigned int key_length; 82 | unsigned char key[HMAC_MAX_MD_CBLOCK]; 83 | } HMAC_CTX; 84 | 85 | #define HMAC_size(e) (EVP_MD_size((e)->md)) 86 | 87 | 88 | void HMAC_CTX_init(HMAC_CTX *ctx); 89 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); 90 | 91 | #define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */ 92 | 93 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, 94 | const EVP_MD *md); /* deprecated */ 95 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 96 | const EVP_MD *md, ENGINE *impl); 97 | int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); 98 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); 99 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 100 | const unsigned char *d, size_t n, unsigned char *md, 101 | unsigned int *md_len); 102 | int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 103 | 104 | void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 105 | 106 | #ifdef __cplusplus 107 | } 108 | #endif 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* crypto/idea/idea.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_IDEA_H 60 | #define HEADER_IDEA_H 61 | 62 | #include /* IDEA_INT, OPENSSL_NO_IDEA */ 63 | 64 | #ifdef OPENSSL_NO_IDEA 65 | #error IDEA is disabled. 66 | #endif 67 | 68 | #define IDEA_ENCRYPT 1 69 | #define IDEA_DECRYPT 0 70 | 71 | #define IDEA_BLOCK 8 72 | #define IDEA_KEY_LENGTH 16 73 | 74 | #ifdef __cplusplus 75 | extern "C" { 76 | #endif 77 | 78 | typedef struct idea_key_st 79 | { 80 | IDEA_INT data[9][6]; 81 | } IDEA_KEY_SCHEDULE; 82 | 83 | const char *idea_options(void); 84 | void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 85 | IDEA_KEY_SCHEDULE *ks); 86 | void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 87 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 88 | void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 89 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); 90 | void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, 91 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 92 | int *num,int enc); 93 | void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); 95 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* crypto/md4/md4.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MD4_H 60 | #define HEADER_MD4_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | #ifdef OPENSSL_NO_MD4 70 | #error MD4 is disabled. 71 | #endif 72 | 73 | /* 74 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 75 | * ! MD4_LONG has to be at least 32 bits wide. If it's wider, then ! 76 | * ! MD4_LONG_LOG2 has to be defined along. ! 77 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 78 | */ 79 | 80 | #if defined(__LP32__) 81 | #define MD4_LONG unsigned long 82 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 83 | #define MD4_LONG unsigned long 84 | #define MD4_LONG_LOG2 3 85 | /* 86 | * _CRAY note. I could declare short, but I have no idea what impact 87 | * does it have on performance on none-T3E machines. I could declare 88 | * int, but at least on C90 sizeof(int) can be chosen at compile time. 89 | * So I've chosen long... 90 | * 91 | */ 92 | #else 93 | #define MD4_LONG unsigned int 94 | #endif 95 | 96 | #define MD4_CBLOCK 64 97 | #define MD4_LBLOCK (MD4_CBLOCK/4) 98 | #define MD4_DIGEST_LENGTH 16 99 | 100 | typedef struct MD4state_st 101 | { 102 | MD4_LONG A,B,C,D; 103 | MD4_LONG Nl,Nh; 104 | MD4_LONG data[MD4_LBLOCK]; 105 | unsigned int num; 106 | } MD4_CTX; 107 | 108 | int MD4_Init(MD4_CTX *c); 109 | int MD4_Update(MD4_CTX *c, const void *data, size_t len); 110 | int MD4_Final(unsigned char *md, MD4_CTX *c); 111 | unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 112 | void MD4_Transform(MD4_CTX *c, const unsigned char *b); 113 | #ifdef __cplusplus 114 | } 115 | #endif 116 | 117 | #endif 118 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* crypto/md5/md5.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MD5_H 60 | #define HEADER_MD5_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | #ifdef OPENSSL_NO_MD5 70 | #error MD5 is disabled. 71 | #endif 72 | 73 | /* 74 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 75 | * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then ! 76 | * ! MD5_LONG_LOG2 has to be defined along. ! 77 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 78 | */ 79 | 80 | #if defined(__LP32__) 81 | #define MD5_LONG unsigned long 82 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 83 | #define MD5_LONG unsigned long 84 | #define MD5_LONG_LOG2 3 85 | /* 86 | * _CRAY note. I could declare short, but I have no idea what impact 87 | * does it have on performance on none-T3E machines. I could declare 88 | * int, but at least on C90 sizeof(int) can be chosen at compile time. 89 | * So I've chosen long... 90 | * 91 | */ 92 | #else 93 | #define MD5_LONG unsigned int 94 | #endif 95 | 96 | #define MD5_CBLOCK 64 97 | #define MD5_LBLOCK (MD5_CBLOCK/4) 98 | #define MD5_DIGEST_LENGTH 16 99 | 100 | typedef struct MD5state_st 101 | { 102 | MD5_LONG A,B,C,D; 103 | MD5_LONG Nl,Nh; 104 | MD5_LONG data[MD5_LBLOCK]; 105 | unsigned int num; 106 | } MD5_CTX; 107 | 108 | int MD5_Init(MD5_CTX *c); 109 | int MD5_Update(MD5_CTX *c, const void *data, size_t len); 110 | int MD5_Final(unsigned char *md, MD5_CTX *c); 111 | unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); 112 | void MD5_Transform(MD5_CTX *c, const unsigned char *b); 113 | #ifdef __cplusplus 114 | } 115 | #endif 116 | 117 | #endif 118 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | /* crypto/mdc2/mdc2.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MDC2_H 60 | #define HEADER_MDC2_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #ifdef OPENSSL_NO_MDC2 69 | #error MDC2 is disabled. 70 | #endif 71 | 72 | #define MDC2_BLOCK 8 73 | #define MDC2_DIGEST_LENGTH 16 74 | 75 | typedef struct mdc2_ctx_st 76 | { 77 | unsigned int num; 78 | unsigned char data[MDC2_BLOCK]; 79 | DES_cblock h,hh; 80 | int pad_type; /* either 1 or 2, default 1 */ 81 | } MDC2_CTX; 82 | 83 | 84 | int MDC2_Init(MDC2_CTX *c); 85 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 86 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); 87 | unsigned char *MDC2(const unsigned char *d, size_t n, 88 | unsigned char *md); 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | 94 | #endif 95 | 96 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/modes.h: -------------------------------------------------------------------------------- 1 | /* ==================================================================== 2 | * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 3 | * 4 | * Rights for redistribution and usage in source and binary 5 | * forms are granted according to the OpenSSL license. 6 | */ 7 | 8 | #include 9 | 10 | typedef void (*block128_f)(const unsigned char in[16], 11 | unsigned char out[16], 12 | const void *key); 13 | 14 | typedef void (*cbc128_f)(const unsigned char *in, unsigned char *out, 15 | size_t len, const void *key, 16 | unsigned char ivec[16], int enc); 17 | 18 | void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out, 19 | size_t len, const void *key, 20 | unsigned char ivec[16], block128_f block); 21 | void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, 22 | size_t len, const void *key, 23 | unsigned char ivec[16], block128_f block); 24 | 25 | void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out, 26 | size_t len, const void *key, 27 | unsigned char ivec[16], unsigned char ecount_buf[16], 28 | unsigned int *num, block128_f block); 29 | 30 | void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, 31 | size_t len, const void *key, 32 | unsigned char ivec[16], int *num, 33 | block128_f block); 34 | 35 | void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, 36 | size_t len, const void *key, 37 | unsigned char ivec[16], int *num, 38 | int enc, block128_f block); 39 | void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out, 40 | size_t length, const void *key, 41 | unsigned char ivec[16], int *num, 42 | int enc, block128_f block); 43 | void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out, 44 | size_t bits, const void *key, 45 | unsigned char ivec[16], int *num, 46 | int enc, block128_f block); 47 | 48 | size_t CRYPTO_cts128_encrypt_block(const unsigned char *in, unsigned char *out, 49 | size_t len, const void *key, 50 | unsigned char ivec[16], block128_f block); 51 | size_t CRYPTO_cts128_encrypt(const unsigned char *in, unsigned char *out, 52 | size_t len, const void *key, 53 | unsigned char ivec[16], cbc128_f cbc); 54 | size_t CRYPTO_cts128_decrypt_block(const unsigned char *in, unsigned char *out, 55 | size_t len, const void *key, 56 | unsigned char ivec[16], block128_f block); 57 | size_t CRYPTO_cts128_decrypt(const unsigned char *in, unsigned char *out, 58 | size_t len, const void *key, 59 | unsigned char ivec[16], cbc128_f cbc); 60 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_OPENSSLV_H 2 | #define HEADER_OPENSSLV_H 3 | 4 | /* Numeric release version identifier: 5 | * MNNFFPPS: major minor fix patch status 6 | * The status nibble has one of the values 0 for development, 1 to e for betas 7 | * 1 to 14, and f for release. The patch level is exactly that. 8 | * For example: 9 | * 0.9.3-dev 0x00903000 10 | * 0.9.3-beta1 0x00903001 11 | * 0.9.3-beta2-dev 0x00903002 12 | * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) 13 | * 0.9.3 0x0090300f 14 | * 0.9.3a 0x0090301f 15 | * 0.9.4 0x0090400f 16 | * 1.2.3z 0x102031af 17 | * 18 | * For continuity reasons (because 0.9.5 is already out, and is coded 19 | * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level 20 | * part is slightly different, by setting the highest bit. This means 21 | * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start 22 | * with 0x0090600S... 23 | * 24 | * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) 25 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for 26 | * major minor fix final patch/beta) 27 | */ 28 | #define OPENSSL_VERSION_NUMBER 0x1000001fL 29 | #ifdef OPENSSL_FIPS 30 | #define OPENSSL_VERSION_TEXT "OpenSSL 1.0.0a-fips 1 Jun 2010" 31 | #else 32 | #define OPENSSL_VERSION_TEXT "OpenSSL 1.0.0a 1 Jun 2010" 33 | #endif 34 | #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT 35 | 36 | 37 | /* The macros below are to be used for shared library (.so, .dll, ...) 38 | * versioning. That kind of versioning works a bit differently between 39 | * operating systems. The most usual scheme is to set a major and a minor 40 | * number, and have the runtime loader check that the major number is equal 41 | * to what it was at application link time, while the minor number has to 42 | * be greater or equal to what it was at application link time. With this 43 | * scheme, the version number is usually part of the file name, like this: 44 | * 45 | * libcrypto.so.0.9 46 | * 47 | * Some unixen also make a softlink with the major verson number only: 48 | * 49 | * libcrypto.so.0 50 | * 51 | * On Tru64 and IRIX 6.x it works a little bit differently. There, the 52 | * shared library version is stored in the file, and is actually a series 53 | * of versions, separated by colons. The rightmost version present in the 54 | * library when linking an application is stored in the application to be 55 | * matched at run time. When the application is run, a check is done to 56 | * see if the library version stored in the application matches any of the 57 | * versions in the version string of the library itself. 58 | * This version string can be constructed in any way, depending on what 59 | * kind of matching is desired. However, to implement the same scheme as 60 | * the one used in the other unixen, all compatible versions, from lowest 61 | * to highest, should be part of the string. Consecutive builds would 62 | * give the following versions strings: 63 | * 64 | * 3.0 65 | * 3.0:3.1 66 | * 3.0:3.1:3.2 67 | * 4.0 68 | * 4.0:4.1 69 | * 70 | * Notice how version 4 is completely incompatible with version, and 71 | * therefore give the breach you can see. 72 | * 73 | * There may be other schemes as well that I haven't yet discovered. 74 | * 75 | * So, here's the way it works here: first of all, the library version 76 | * number doesn't need at all to match the overall OpenSSL version. 77 | * However, it's nice and more understandable if it actually does. 78 | * The current library version is stored in the macro SHLIB_VERSION_NUMBER, 79 | * which is just a piece of text in the format "M.m.e" (Major, minor, edit). 80 | * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, 81 | * we need to keep a history of version numbers, which is done in the 82 | * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and 83 | * should only keep the versions that are binary compatible with the current. 84 | */ 85 | #define SHLIB_VERSION_HISTORY "" 86 | #define SHLIB_VERSION_NUMBER "1.0.0" 87 | 88 | 89 | #endif /* HEADER_OPENSSLV_H */ 90 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* ==================================================================== 2 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * 3. All advertising materials mentioning features or use of this 17 | * software must display the following acknowledgment: 18 | * "This product includes software developed by the OpenSSL Project 19 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 20 | * 21 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 22 | * endorse or promote products derived from this software without 23 | * prior written permission. For written permission, please contact 24 | * licensing@OpenSSL.org. 25 | * 26 | * 5. Products derived from this software may not be called "OpenSSL" 27 | * nor may "OpenSSL" appear in their names without prior written 28 | * permission of the OpenSSL Project. 29 | * 30 | * 6. Redistributions of any form whatsoever must retain the following 31 | * acknowledgment: 32 | * "This product includes software developed by the OpenSSL Project 33 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 34 | * 35 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 36 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 37 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 38 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 39 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 41 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 42 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 43 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 44 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 45 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 46 | * OF THE POSSIBILITY OF SUCH DAMAGE. 47 | * ==================================================================== 48 | * 49 | * This product includes cryptographic software written by Eric Young 50 | * (eay@cryptsoft.com). This product includes software written by Tim 51 | * Hudson (tjh@cryptsoft.com). 52 | * 53 | */ 54 | 55 | /* 56 | * This header only exists to break a circular dependency between pem and err 57 | * Ben 30 Jan 1999. 58 | */ 59 | 60 | #ifdef __cplusplus 61 | extern "C" { 62 | #endif 63 | 64 | #ifndef HEADER_PEM_H 65 | void ERR_load_PEM_strings(void); 66 | #endif 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/pqueue.h: -------------------------------------------------------------------------------- 1 | /* crypto/pqueue/pqueue.h */ 2 | /* 3 | * DTLS implementation written by Nagendra Modadugu 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * openssl-core@OpenSSL.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | * 54 | * This product includes cryptographic software written by Eric Young 55 | * (eay@cryptsoft.com). This product includes software written by Tim 56 | * Hudson (tjh@cryptsoft.com). 57 | * 58 | */ 59 | 60 | #ifndef HEADER_PQUEUE_H 61 | #define HEADER_PQUEUE_H 62 | 63 | #include 64 | #include 65 | #include 66 | 67 | typedef struct _pqueue *pqueue; 68 | 69 | typedef struct _pitem 70 | { 71 | unsigned char priority[8]; /* 64-bit value in big-endian encoding */ 72 | void *data; 73 | struct _pitem *next; 74 | } pitem; 75 | 76 | typedef struct _pitem *piterator; 77 | 78 | pitem *pitem_new(unsigned char *prio64be, void *data); 79 | void pitem_free(pitem *item); 80 | 81 | pqueue pqueue_new(void); 82 | void pqueue_free(pqueue pq); 83 | 84 | pitem *pqueue_insert(pqueue pq, pitem *item); 85 | pitem *pqueue_peek(pqueue pq); 86 | pitem *pqueue_pop(pqueue pq); 87 | pitem *pqueue_find(pqueue pq, unsigned char *prio64be); 88 | pitem *pqueue_iterator(pqueue pq); 89 | pitem *pqueue_next(piterator *iter); 90 | 91 | void pqueue_print(pqueue pq); 92 | int pqueue_size(pqueue pq); 93 | 94 | #endif /* ! HEADER_PQUEUE_H */ 95 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* crypto/rc2/rc2.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC2_H 60 | #define HEADER_RC2_H 61 | 62 | #include /* OPENSSL_NO_RC2, RC2_INT */ 63 | #ifdef OPENSSL_NO_RC2 64 | #error RC2 is disabled. 65 | #endif 66 | 67 | #define RC2_ENCRYPT 1 68 | #define RC2_DECRYPT 0 69 | 70 | #define RC2_BLOCK 8 71 | #define RC2_KEY_LENGTH 16 72 | 73 | #ifdef __cplusplus 74 | extern "C" { 75 | #endif 76 | 77 | typedef struct rc2_key_st 78 | { 79 | RC2_INT data[64]; 80 | } RC2_KEY; 81 | 82 | 83 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); 84 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, 85 | int enc); 86 | void RC2_encrypt(unsigned long *data,RC2_KEY *key); 87 | void RC2_decrypt(unsigned long *data,RC2_KEY *key); 88 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 89 | RC2_KEY *ks, unsigned char *iv, int enc); 90 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, 91 | long length, RC2_KEY *schedule, unsigned char *ivec, 92 | int *num, int enc); 93 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, RC2_KEY *schedule, unsigned char *ivec, 95 | int *num); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* crypto/rc4/rc4.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC4_H 60 | #define HEADER_RC4_H 61 | 62 | #include /* OPENSSL_NO_RC4, RC4_INT */ 63 | #ifdef OPENSSL_NO_RC4 64 | #error RC4 is disabled. 65 | #endif 66 | 67 | #include 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | typedef struct rc4_key_st 74 | { 75 | RC4_INT x,y; 76 | RC4_INT data[256]; 77 | } RC4_KEY; 78 | 79 | 80 | const char *RC4_options(void); 81 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 82 | void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, 83 | unsigned char *outdata); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif 90 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* crypto/ripemd/ripemd.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RIPEMD_H 60 | #define HEADER_RIPEMD_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | #ifdef OPENSSL_NO_RIPEMD 70 | #error RIPEMD is disabled. 71 | #endif 72 | 73 | #if defined(__LP32__) 74 | #define RIPEMD160_LONG unsigned long 75 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 76 | #define RIPEMD160_LONG unsigned long 77 | #define RIPEMD160_LONG_LOG2 3 78 | #else 79 | #define RIPEMD160_LONG unsigned int 80 | #endif 81 | 82 | #define RIPEMD160_CBLOCK 64 83 | #define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 84 | #define RIPEMD160_DIGEST_LENGTH 20 85 | 86 | typedef struct RIPEMD160state_st 87 | { 88 | RIPEMD160_LONG A,B,C,D,E; 89 | RIPEMD160_LONG Nl,Nh; 90 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 91 | unsigned int num; 92 | } RIPEMD160_CTX; 93 | 94 | int RIPEMD160_Init(RIPEMD160_CTX *c); 95 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 96 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 97 | unsigned char *RIPEMD160(const unsigned char *d, size_t n, 98 | unsigned char *md); 99 | void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); 100 | #ifdef __cplusplus 101 | } 102 | #endif 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/ssl23.h: -------------------------------------------------------------------------------- 1 | /* ssl/ssl23.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_SSL23_H 60 | #define HEADER_SSL23_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | /*client */ 67 | /* write to server */ 68 | #define SSL23_ST_CW_CLNT_HELLO_A (0x210|SSL_ST_CONNECT) 69 | #define SSL23_ST_CW_CLNT_HELLO_B (0x211|SSL_ST_CONNECT) 70 | /* read from server */ 71 | #define SSL23_ST_CR_SRVR_HELLO_A (0x220|SSL_ST_CONNECT) 72 | #define SSL23_ST_CR_SRVR_HELLO_B (0x221|SSL_ST_CONNECT) 73 | 74 | /* server */ 75 | /* read from client */ 76 | #define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) 77 | #define SSL23_ST_SR_CLNT_HELLO_B (0x211|SSL_ST_ACCEPT) 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | 84 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/stack.h: -------------------------------------------------------------------------------- 1 | /* crypto/stack/stack.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_STACK_H 60 | #define HEADER_STACK_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | typedef struct stack_st 67 | { 68 | int num; 69 | char **data; 70 | int sorted; 71 | 72 | int num_alloc; 73 | int (*comp)(const void *, const void *); 74 | } _STACK; /* Use STACK_OF(...) instead */ 75 | 76 | #define M_sk_num(sk) ((sk) ? (sk)->num:-1) 77 | #define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) 78 | 79 | int sk_num(const _STACK *); 80 | void *sk_value(const _STACK *, int); 81 | 82 | void *sk_set(_STACK *, int, void *); 83 | 84 | _STACK *sk_new(int (*cmp)(const void *, const void *)); 85 | _STACK *sk_new_null(void); 86 | void sk_free(_STACK *); 87 | void sk_pop_free(_STACK *st, void (*func)(void *)); 88 | int sk_insert(_STACK *sk, void *data, int where); 89 | void *sk_delete(_STACK *st, int loc); 90 | void *sk_delete_ptr(_STACK *st, void *p); 91 | int sk_find(_STACK *st, void *data); 92 | int sk_find_ex(_STACK *st, void *data); 93 | int sk_push(_STACK *st, void *data); 94 | int sk_unshift(_STACK *st, void *data); 95 | void *sk_shift(_STACK *st); 96 | void *sk_pop(_STACK *st); 97 | void sk_zero(_STACK *st); 98 | int (*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *))) 99 | (const void *, const void *); 100 | _STACK *sk_dup(_STACK *st); 101 | void sk_sort(_STACK *st); 102 | int sk_is_sorted(const _STACK *st); 103 | 104 | #ifdef __cplusplus 105 | } 106 | #endif 107 | 108 | #endif 109 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* crypto/txt_db/txt_db.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_TXT_DB_H 60 | #define HEADER_TXT_DB_H 61 | 62 | #include 63 | #ifndef OPENSSL_NO_BIO 64 | #include 65 | #endif 66 | #include 67 | #include 68 | 69 | #define DB_ERROR_OK 0 70 | #define DB_ERROR_MALLOC 1 71 | #define DB_ERROR_INDEX_CLASH 2 72 | #define DB_ERROR_INDEX_OUT_OF_RANGE 3 73 | #define DB_ERROR_NO_INDEX 4 74 | #define DB_ERROR_INSERT_INDEX_CLASH 5 75 | 76 | #ifdef __cplusplus 77 | extern "C" { 78 | #endif 79 | 80 | typedef OPENSSL_STRING *OPENSSL_PSTRING; 81 | DECLARE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) 82 | 83 | typedef struct txt_db_st 84 | { 85 | int num_fields; 86 | STACK_OF(OPENSSL_PSTRING) *data; 87 | LHASH_OF(OPENSSL_STRING) **index; 88 | int (**qual)(OPENSSL_STRING *); 89 | long error; 90 | long arg1; 91 | long arg2; 92 | OPENSSL_STRING *arg_row; 93 | } TXT_DB; 94 | 95 | #ifndef OPENSSL_NO_BIO 96 | TXT_DB *TXT_DB_read(BIO *in, int num); 97 | long TXT_DB_write(BIO *out, TXT_DB *db); 98 | #else 99 | TXT_DB *TXT_DB_read(char *in, int num); 100 | long TXT_DB_write(char *out, TXT_DB *db); 101 | #endif 102 | int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(OPENSSL_STRING *), 103 | LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); 104 | void TXT_DB_free(TXT_DB *db); 105 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value); 106 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/ui_compat.h: -------------------------------------------------------------------------------- 1 | /* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 3 | * project 2001. 4 | */ 5 | /* ==================================================================== 6 | * Copyright (c) 2001 The OpenSSL Project. All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in 17 | * the documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * 3. All advertising materials mentioning features or use of this 21 | * software must display the following acknowledgment: 22 | * "This product includes software developed by the OpenSSL Project 23 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 24 | * 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 26 | * endorse or promote products derived from this software without 27 | * prior written permission. For written permission, please contact 28 | * openssl-core@openssl.org. 29 | * 30 | * 5. Products derived from this software may not be called "OpenSSL" 31 | * nor may "OpenSSL" appear in their names without prior written 32 | * permission of the OpenSSL Project. 33 | * 34 | * 6. Redistributions of any form whatsoever must retain the following 35 | * acknowledgment: 36 | * "This product includes software developed by the OpenSSL Project 37 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 38 | * 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * ==================================================================== 52 | * 53 | * This product includes cryptographic software written by Eric Young 54 | * (eay@cryptsoft.com). This product includes software written by Tim 55 | * Hudson (tjh@cryptsoft.com). 56 | * 57 | */ 58 | 59 | #ifndef HEADER_UI_COMPAT_H 60 | #define HEADER_UI_COMPAT_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* The following functions were previously part of the DES section, 70 | and are provided here for backward compatibility reasons. */ 71 | 72 | #define des_read_pw_string(b,l,p,v) \ 73 | _ossl_old_des_read_pw_string((b),(l),(p),(v)) 74 | #define des_read_pw(b,bf,s,p,v) \ 75 | _ossl_old_des_read_pw((b),(bf),(s),(p),(v)) 76 | 77 | int _ossl_old_des_read_pw_string(char *buf,int length,const char *prompt,int verify); 78 | int _ossl_old_des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif 84 | -------------------------------------------------------------------------------- /OtherSources/lib/include/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_WHRLPOOL_H 2 | #define HEADER_WHRLPOOL_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define WHIRLPOOL_DIGEST_LENGTH (512/8) 12 | #define WHIRLPOOL_BBLOCK 512 13 | #define WHIRLPOOL_COUNTER (256/8) 14 | 15 | typedef struct { 16 | union { 17 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 18 | /* double q is here to ensure 64-bit alignment */ 19 | double q[WHIRLPOOL_DIGEST_LENGTH/sizeof(double)]; 20 | } H; 21 | unsigned char data[WHIRLPOOL_BBLOCK/8]; 22 | unsigned int bitoff; 23 | size_t bitlen[WHIRLPOOL_COUNTER/sizeof(size_t)]; 24 | } WHIRLPOOL_CTX; 25 | 26 | #ifndef OPENSSL_NO_WHIRLPOOL 27 | int WHIRLPOOL_Init (WHIRLPOOL_CTX *c); 28 | int WHIRLPOOL_Update (WHIRLPOOL_CTX *c,const void *inp,size_t bytes); 29 | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *inp,size_t bits); 30 | int WHIRLPOOL_Final (unsigned char *md,WHIRLPOOL_CTX *c); 31 | unsigned char *WHIRLPOOL(const void *inp,size_t bytes,unsigned char *md); 32 | #endif 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /OtherSources/lib/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/OtherSources/lib/libcrypto.a -------------------------------------------------------------------------------- /OtherSources/lib/xar/appledouble.h: -------------------------------------------------------------------------------- 1 | /* Information pulled from: 2 | * "AppleSingle/AppleDouble Formats for Foreign Files Developer's Note" 3 | * (c) Apple Computer 1990 4 | * File assembled by Rob Braun (bbraun@synack.net) 5 | */ 6 | 7 | #ifndef __APPLEDOUBLE__ 8 | #define __APPLEDOUBLE__ 9 | 10 | #include 11 | #include 12 | 13 | /* Structure of an AppleSingle file: 14 | * ---------------------- 15 | * | AppleSingleHeader | 16 | * |--------------------| 17 | * | ASH.entries # of | 18 | * | AppleSingleEntry | 19 | * | Descriptors | 20 | * | 1 | 21 | * | . | 22 | * | . | 23 | * | n | 24 | * |--------------------| 25 | * | Datablock 1 | 26 | * |--------------------| 27 | * | Datablock 2 | 28 | * |--------------------| 29 | * | Datablock n | 30 | * ---------------------- 31 | */ 32 | 33 | struct AppleSingleHeader { 34 | uint32_t magic; /* Magic Number (0x00051600 for AS) */ 35 | uint32_t version; /* Version #. 0x00020000 */ 36 | char filler[16]; /* All zeros */ 37 | uint16_t entries; /* Number of entries in the file */ 38 | }; 39 | 40 | #define XAR_ASH_SIZE 26 /* sizeof(struct AppleSingleHeader) will be wrong 41 | * due to padding. */ 42 | 43 | #define APPLESINGLE_MAGIC 0x00051600 44 | #define APPLEDOUBLE_MAGIC 0x00051607 45 | 46 | #define APPLESINGLE_VERSION 0x00020000 47 | #define APPLEDOUBLE_VERSION 0x00020000 48 | 49 | struct AppleSingleEntry { 50 | uint32_t entry_id; /* What the entry is. See defines below */ 51 | uint32_t offset; /* offset of data, offset beginning of file */ 52 | uint32_t length; /* length of data. can be 0 */ 53 | }; 54 | 55 | /* Valid entry_id values */ 56 | /* Entries 1, 3, and 8 are typically created for all files. 57 | * Macintosh Icon entries are rare, since those are typically in the resource 58 | * fork. 59 | */ 60 | #define AS_ID_DATA 1 /* Data fork */ 61 | #define AS_ID_RESOURCE 2 /* Resource fork */ 62 | #define AS_ID_NAME 3 /* Name of the file */ 63 | #define AS_ID_COMMENT 4 /* Standard Macintosh comment */ 64 | #define AS_ID_BWICON 5 /* Standard Macintosh B&W icon */ 65 | #define AS_ID_COLORICON 6 /* Standard Macintosh Color icon */ 66 | /* There is no 7 */ 67 | #define AS_ID_DATES 8 /* File creation date, modification date, etc. */ 68 | #define AS_ID_FINDER 9 /* Finder Information */ 69 | #define AS_ID_MAC 10 /* Macintosh File information, attributes, etc. */ 70 | #define AS_ID_PRODOS 11 /* ProDOS file information */ 71 | #define AS_ID_MSDOS 12 /* MS-DOS file information */ 72 | #define AS_ID_SHORTNAME 13 /* AFP short name */ 73 | #define AS_ID_AFPINFO 14 /* AFP file information */ 74 | #define AS_ID_AFPDIR 15 /* AFP directory id */ 75 | /* 1-0x7FFFFFFF are reserved by Apple */ 76 | 77 | /* File Dates are stored as the # of seconds before or after 78 | * 12am Jan 1, 2000 GMT. The default value is 0x80000000. 79 | */ 80 | struct MacTimes { 81 | uint32_t creation; 82 | uint32_t modification; 83 | uint32_t backup; 84 | uint32_t access; 85 | }; 86 | 87 | /* Finder Information is two 16 byte quantities. 88 | * Newly created files have all 0's in both entries. 89 | */ 90 | 91 | /* Macintosh File Info entry (10) a 32 bit bitmask. */ 92 | 93 | /* Entries can be placed in any order, although Apple recommends: 94 | * Place the data block (1) last. 95 | * Finder Info, File Dates Info, and Macintosh File Info first. 96 | * Allocate resource for entries in 4K blocks. 97 | */ 98 | 99 | /* AppleDouble files are simply AppleSingle files without the data fork. 100 | * The magic number is different as a read optimization. 101 | */ 102 | 103 | #endif /* __APPLEDOUBLE__ */ 104 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/archive.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | 39 | #ifndef _XAR_ARCHIVE_H_ 40 | #define _XAR_ARCHIVE_H_ 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include "xar.h" 47 | #include "filetree.h" 48 | 49 | struct errctx { 50 | const char *str; 51 | int saved_errno; 52 | xar_file_t file; 53 | void *usrctx; 54 | }; 55 | 56 | struct __xar_t { 57 | xar_prop_t props; 58 | xar_attr_t attrs; /* archive options, such as rsize */ 59 | const char *prefix; 60 | const char *ns; 61 | const char *filler1; 62 | const char *filler2; 63 | xar_file_t files; /* file forest */ 64 | const char *filename; /* name of the archive we are operating on */ 65 | char *dirname; /* directory of the archive, used in creation */ 66 | int fd; /* open file descriptor for the archive */ 67 | int heap_fd; /* fd for tmp heap archive, used in creation */ 68 | off_t heap_offset; /* current offset within the heap */ 69 | off_t heap_len; /* current length of the heap */ 70 | xar_header_t header; /* header of the xar archive */ 71 | void *readbuf; /* buffer for reading/writing compressed toc */ 72 | size_t readbuf_len; /* length of readbuf */ 73 | size_t offset; /* offset into readbuf for keeping track 74 | * between callbacks. */ 75 | size_t toc_count; /* current bytes read of the toc */ 76 | z_stream zs; /* gz state for compressing/decompressing toc */ 77 | char *path_prefix; /* used for distinguishing absolute paths */ 78 | err_handler ercallback; /* callback for errors/warnings */ 79 | struct errctx errctx; /* error callback context */ 80 | xar_subdoc_t subdocs; /* linked list of subdocs */ 81 | xar_signature_t signatures; /* linked list of signatures */ 82 | uint64_t last_fileid; /* unique fileid's in the archive */ 83 | xmlHashTablePtr ino_hash; /* Hash for looking up hardlinked files (add)*/ 84 | xmlHashTablePtr link_hash; /* Hash for looking up hardlinked files (extract)*/ 85 | xmlHashTablePtr csum_hash; /* Hash for looking up checksums of files */ 86 | EVP_MD_CTX toc_ctx; 87 | int docksum; 88 | int skipwarn; 89 | struct stat sbcache; 90 | }; 91 | 92 | #define XAR(x) ((struct __xar_t *)(x)) 93 | 94 | #endif /* _XAR_ARCHIVE_H_ */ 95 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/arcmod.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #include "arcmod.h" 39 | #include "stat.h" 40 | #include "data.h" 41 | #include "linuxattr.h" 42 | #include "fbsdattr.h" 43 | #include "darwinattr.h" 44 | #include "ext2.h" 45 | 46 | struct arcmod xar_arcmods[] = { 47 | { xar_stat_archive, xar_stat_extract }, /* must be first */ 48 | { xar_linuxattr_archive, xar_linuxattr_extract }, 49 | { xar_fbsdattr_archive, xar_fbsdattr_extract }, 50 | { xar_darwinattr_archive, xar_darwinattr_extract }, 51 | { xar_ext2attr_archive, xar_ext2attr_extract }, 52 | { xar_data_archive, xar_data_extract }, 53 | /* Add new modules here */ 54 | { NULL, xar_set_perm }, 55 | { NULL, xar_flags_extract } 56 | }; 57 | 58 | /* xar_arcmod_archive 59 | * x: archive to add the file to 60 | * f: node representing the file 61 | * file: the filesystem path to the file 62 | * Returns: 0 on success 63 | * Summary: This is the entry point to actual file archival. 64 | */ 65 | int32_t xar_arcmod_archive(xar_t x, xar_file_t f, const char *file, const char *buffer, size_t len) { 66 | int i; 67 | int32_t ret; 68 | for(i = 0; i < (sizeof(xar_arcmods)/sizeof(struct arcmod)); i++) { 69 | if( xar_arcmods[i].archive ) { 70 | ret = xar_arcmods[i].archive(x, f, file, buffer, len); 71 | if( ret < 0 ) { 72 | return ret; 73 | } 74 | if( ret > 0 ) { 75 | return 0; 76 | } 77 | } 78 | } 79 | return 0; 80 | } 81 | 82 | /* xar_arcmod_extract 83 | * x: archive to extract the file from 84 | * f: node representing the file 85 | * file: the filesystem path to the target file 86 | * Returns: 0 on success 87 | * Summary: This is the entry point to actual file archival. 88 | */ 89 | int32_t xar_arcmod_extract(xar_t x, xar_file_t f, const char *file, char *buffer, size_t len) { 90 | int i; 91 | int32_t ret; 92 | for(i = 0; i < (sizeof(xar_arcmods)/sizeof(struct arcmod)); i++) { 93 | if( xar_arcmods[i].extract ) { 94 | ret = xar_arcmods[i].extract(x, f, file, buffer, len); 95 | if( ret < 0 ) { 96 | return ret; 97 | } 98 | if( ret > 0 ) { 99 | return 0; 100 | } 101 | } 102 | } 103 | return 0; 104 | } 105 | 106 | 107 | int32_t xar_arcmod_verify(xar_t x, xar_file_t f){ 108 | return xar_data_verify(x,f); 109 | } 110 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/arcmod.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | 39 | #ifndef _XAR_ARCMOD_H_ 40 | #define _XAR_ARCMOD_H_ 41 | #include "xar.h" 42 | #include "filetree.h" 43 | 44 | 45 | typedef int32_t (*arcmod_archive)(xar_t x, xar_file_t f, const char* file, const char *buffer, size_t len); 46 | typedef int32_t (*arcmod_extract)(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len); 47 | 48 | struct arcmod { 49 | arcmod_archive archive; 50 | arcmod_extract extract; 51 | }; 52 | 53 | int32_t xar_arcmod_archive(xar_t x, xar_file_t f, const char *file, const char *buffer, size_t len); 54 | int32_t xar_arcmod_extract(xar_t x, xar_file_t f, const char *file, char *buffer, size_t len); 55 | 56 | int32_t xar_arcmod_verify(xar_t x, xar_file_t f); 57 | 58 | #endif /* _XAR_ARCMOD_H_ */ 59 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/asprintf.h: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // Copyright (C) 2005 Jason Evans . All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice(s), 9 | // this list of conditions and the following disclaimer unmodified other than 10 | // the allowable addition of one or more copyright notices. 11 | // 12 | // 2. Redistributions in binary form must reproduce the above copyright 13 | // notice(s), this list of conditions and the following disclaimer in the 14 | // documentation and/or other materials provided with the distribution. 15 | // 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) `AS IS' AND ANY EXPRESS 17 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 19 | // NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 22 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 25 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | // 27 | //============================================================================== 28 | // 29 | // Emulate vasprintf() and asprintf(). 30 | // 31 | //============================================================================== 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | static inline int 38 | vasprintf(char **rResult, const char *aFormat, va_list aAp) 39 | { 40 | int rVal; 41 | char *result; 42 | va_list ap; 43 | #define XarAsprintfStartLen 16 44 | 45 | result = (char *) malloc(XarAsprintfStartLen); 46 | if (result == NULL) 47 | { 48 | rVal = -1; 49 | goto RETURN; 50 | } 51 | 52 | va_copy(ap, aAp); 53 | rVal = vsnprintf(result, XarAsprintfStartLen, aFormat, ap); 54 | va_end(ap); 55 | 56 | if (rVal == -1) 57 | { 58 | goto RETURN; 59 | } 60 | else if (rVal >= XarAsprintfStartLen) 61 | { 62 | free(result); 63 | result = (char *) malloc(rVal + 1); 64 | if (result == NULL) 65 | { 66 | rVal = -1; 67 | goto RETURN; 68 | } 69 | 70 | va_copy(ap, aAp); 71 | rVal = vsnprintf(result, rVal + 1, aFormat, aAp); 72 | va_end(ap); 73 | } 74 | 75 | *rResult = result; 76 | RETURN: 77 | #undef XarAsprintfStartLen 78 | return rVal; 79 | } 80 | 81 | static int 82 | asprintf(char **rResult, const char *aFormat, ...) 83 | { 84 | int rVal; 85 | va_list ap; 86 | 87 | va_start(ap, aFormat); 88 | rVal = vasprintf(rResult, aFormat, ap); 89 | va_end(ap); 90 | 91 | return rVal; 92 | } 93 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/b64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Rob Braun 3 | * 1-Oct-2004 4 | * Copyright (c) 2004 Rob Braun. All rights reserved. 5 | */ 6 | 7 | #ifndef _XAR_BASE64_H_ 8 | #define _XAR_BASE64_H_ 9 | 10 | unsigned char* xar_to_base64(const unsigned char* input, int len); 11 | unsigned char* xar_from_base64(const unsigned char* input, int len); 12 | 13 | #endif /* _XAR_BASE64_H_ */ 14 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/bzxar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_BZLIB_H_ 39 | #define _XAR_BZLIB_H_ 40 | 41 | int xar_bzip_fromheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 42 | int xar_bzip_fromheap_done(xar_t x, xar_file_t f, xar_prop_t p, void **context); 43 | 44 | int32_t xar_bzip_toheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 45 | int xar_bzip_toheap_done(xar_t x, xar_file_t f, xar_prop_t p, void **context); 46 | 47 | #endif /* _XAR_BZLIB_H_ */ 48 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/config.h: -------------------------------------------------------------------------------- 1 | /* include/config.h. Generated by configure. */ 2 | /* #undef HAVE_SYS_STATFS_H */ 3 | #define HAVE_SYS_XATTR_H 1 4 | /* #undef HAVE_SYS_EXTATTR_H */ 5 | #define HAVE_SYS_PARAM_H 1 6 | /* #undef HAVE_LGETXATTR */ 7 | /* #undef HAVE_LSETXATTR */ 8 | #define HAVE_GETXATTR 1 9 | #define HAVE_SETXATTR 1 10 | /* #undef HAVE_GETATTRLIST */ 11 | /* #undef HAVE_SETATTRLIST */ 12 | #define HAVE_CHFLAGS 1 13 | #define HAVE_STATVFS 1 14 | #define HAVE_STATFS 1 15 | /* #undef HAVE_EXT2FS_EXT2_FS_H */ 16 | #define HAVE_STRUCT_STAT_ST_FLAGS 1 17 | /* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ 18 | #define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 19 | #define HAVE_SYS_ACL_H 1 20 | /* #undef HAVE_LIBUTIL_H */ 21 | #define HAVE_ASPRINTF 1 22 | /* #undef HAVE_LIBBZ2 */ 23 | #define HAVE_LCHOWN 1 24 | #define HAVE_LCHMOD 1 25 | #define UID_STRING RId32 26 | #define UID_CAST (uint32_t) 27 | #define GID_STRING PRId32 28 | #define GID_CAST (uint32_t) 29 | #define INO_STRING PRId64 30 | #define INO_HEXSTRING PRIx64 31 | #define INO_CAST (uint64_t) 32 | #define DEV_STRING PRId32 33 | #define DEV_HEXSTRING PRIx32 34 | #define DEV_CAST (uint32_t) 35 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/darwinattr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of Apple nor the names of any contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | /* 29 | * Rob Braun 30 | * 23-Apr-2005 31 | * Copyright (c) 2004 Rob Braun. All rights reserved. 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_DARWINATTR_H_ 39 | #define _XAR_DARWINATTR_H_ 40 | xar_file_t xar_underbar_check(xar_t x, xar_file_t f, const char* file); 41 | int32_t xar_darwinattr_archive(xar_t x, xar_file_t f, const char* file, const char *buffer, size_t len); 42 | int32_t xar_darwinattr_extract(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len); 43 | #endif /* _XAR_DARWINATTR_H_ */ 44 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of Apple nor the names of any contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | /* 29 | * Rob Braun 30 | * 21-Apr-2004 31 | * Copyright (c) 2004 Rob Braun. All rights reserved. 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_DATA_H_ 39 | #define _XAR_DATA_H_ 40 | int32_t xar_data_archive(xar_t x, xar_file_t f, const char* file, const char *buffer, size_t len); 41 | int32_t xar_data_extract(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len); 42 | 43 | int32_t xar_data_verify(xar_t x, xar_file_t f); 44 | #endif /* _XAR_DATA_H_ */ 45 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/ea.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "config.h" 8 | #ifndef HAVE_ASPRINTF 9 | #include "asprintf.h" 10 | #endif 11 | #include "xar.h" 12 | #include "filetree.h" 13 | #include "archive.h" 14 | #include "b64.h" 15 | #include "ea.h" 16 | 17 | struct __xar_ea_t { 18 | const struct __xar_prop_t *prop; 19 | const struct __xar_ea_t *next; 20 | }; 21 | 22 | #define XAR_EA(x) ((struct __xar_ea_t *)(x)) 23 | 24 | xar_ea_t xar_ea_new(xar_file_t f, const char *name) 25 | { 26 | xar_ea_t ret; 27 | 28 | ret = calloc(sizeof(struct __xar_ea_t), 1); 29 | if( !ret ) 30 | return NULL; 31 | 32 | XAR_EA(ret)->prop = xar_prop_new(f, NULL); 33 | if( !XAR_EA(ret)->prop ) { 34 | free(ret); 35 | return NULL; 36 | } 37 | 38 | xar_prop_setkey(XAR_EA(ret)->prop, "ea"); 39 | xar_prop_setvalue(XAR_EA(ret)->prop, NULL); 40 | XAR_PROP(XAR_EA(ret)->prop)->attrs = xar_attr_new(); 41 | XAR_ATTR(XAR_PROP(XAR_EA(ret)->prop)->attrs)->key = strdup("id"); 42 | asprintf((char **)&XAR_ATTR(XAR_PROP(XAR_EA(ret)->prop)->attrs)->value, "%lld", XAR_FILE(f)->nexteaid++); 43 | 44 | xar_prop_pset(f, XAR_EA(ret)->prop, "name", name); 45 | 46 | return ret; 47 | } 48 | 49 | int32_t xar_ea_pset(xar_file_t f, xar_ea_t e, const char *key, const char *value){ 50 | if( xar_prop_pset(f, XAR_EA(e)->prop, key, value) ) 51 | return 0; 52 | return -1; 53 | } 54 | 55 | int32_t xar_ea_pget(xar_ea_t e, const char *key, const char **value) { 56 | xar_prop_t r = xar_prop_find(XAR_EA(e)->prop, key); 57 | if( !r ) { 58 | if( value ) 59 | *value = NULL; 60 | return -1; 61 | } 62 | 63 | if(value) 64 | *value = XAR_PROP(r)->value; 65 | 66 | return 0; 67 | } 68 | 69 | xar_prop_t xar_ea_root(xar_ea_t e) { 70 | return XAR_EA(e)->prop; 71 | } 72 | 73 | xar_prop_t xar_ea_find(xar_file_t f, const char *name) 74 | { 75 | xar_prop_t p; 76 | 77 | for(p = xar_prop_pfirst(f); p; p = xar_prop_pnext(p)) { 78 | const char *tmp; 79 | xar_prop_t tmpp; 80 | 81 | tmp = xar_prop_getkey(p); 82 | if( strncmp(tmp, XAR_EA_FORK, strlen(XAR_EA_FORK)) != 0 ) 83 | continue; 84 | if( strlen(tmp) != strlen(XAR_EA_FORK) ) 85 | continue; 86 | 87 | tmpp = xar_prop_pget(p, "name"); 88 | if( !tmpp ) 89 | continue; 90 | tmp = xar_prop_getvalue(tmpp); 91 | if( !tmp ) 92 | continue; 93 | 94 | if( strcmp(tmp, name) == 0 ) 95 | return p; 96 | } 97 | 98 | return NULL; 99 | } 100 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/ea.h: -------------------------------------------------------------------------------- 1 | #ifndef _XAR_EA_H_ 2 | #define _XAR_EA_H_ 3 | 4 | #include "xar.h" 5 | #include "filetree.h" 6 | 7 | typedef struct __xar_ea_t *xar_ea_t; 8 | 9 | xar_ea_t xar_ea_new(xar_file_t f, const char *name); 10 | int32_t xar_ea_pset(xar_file_t f, xar_ea_t e, const char *key, const char *value); 11 | int32_t xar_ea_pget(xar_ea_t e, const char *key, const char **value); 12 | xar_prop_t xar_ea_root(xar_ea_t e); 13 | xar_prop_t xar_ea_find(xar_file_t f, const char *name); 14 | 15 | #endif /* _XAR_EA_H_ */ 16 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/err.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | 34 | #include 35 | #include 36 | #include 37 | #include "xar.h" 38 | #include "archive.h" 39 | 40 | #define ECTX(x) ((struct errctx *)(x)) 41 | 42 | void xar_register_errhandler(xar_t x, err_handler callback, void *usrctx) { 43 | ECTX(&XAR(x)->errctx)->usrctx = usrctx; 44 | XAR(x)->ercallback = callback; 45 | return; 46 | } 47 | 48 | xar_file_t xar_err_get_file(xar_errctx_t ctx) { 49 | return ECTX(ctx)->file; 50 | } 51 | 52 | void xar_err_set_file(xar_t x, xar_file_t f) { 53 | XAR(x)->errctx.file = f; 54 | return; 55 | } 56 | 57 | const char *xar_err_get_string(xar_errctx_t ctx) { 58 | return ECTX(ctx)->str; 59 | } 60 | 61 | void xar_err_set_string(xar_t x, const char *str) { 62 | XAR(x)->errctx.str = str; 63 | return; 64 | } 65 | 66 | int xar_err_get_errno(xar_errctx_t ctx) { 67 | return ECTX(ctx)->saved_errno; 68 | } 69 | 70 | void xar_err_set_errno(xar_t x, int e) { 71 | XAR(x)->errctx.saved_errno = e; 72 | return; 73 | } 74 | 75 | void xar_err_new(xar_t x) { 76 | memset(&XAR(x)->errctx, 0, sizeof(struct errctx)); 77 | XAR(x)->errctx.saved_errno = errno; 78 | return; 79 | } 80 | 81 | int32_t xar_err_callback(xar_t x, int32_t sev, int32_t err) { 82 | if( XAR(x)->ercallback ) 83 | return XAR(x)->ercallback(sev, err, &XAR(x)->errctx, ECTX(&XAR(x)->errctx)->usrctx); 84 | return 0; 85 | } 86 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/ext2.h: -------------------------------------------------------------------------------- 1 | /* All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions 5 | * are met: 6 | * 1. Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * 2. Redistributions in binary form must reproduce the above copyright 9 | * notice, this list of conditions and the following disclaimer in the 10 | * documentation and/or other materials provided with the distribution. 11 | * 3. Neither the name of Apple nor the names of any contributors 12 | * may be used to endorse or promote products derived from this software 13 | * without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | * POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | /* 28 | * Rob Braun 29 | * 26-Oct-2004 30 | * Copyright (c) 2004 Rob Braun. All rights reserved. 31 | */ 32 | /* 33 | * Portions Copyright 2006, Apple Computer, Inc. 34 | * Christopher Ryan 35 | */ 36 | 37 | #ifndef _XAR_EXT2_H_ 38 | #define _XAR_EXT2_H_ 39 | #define XAR_ATTR_FORK "attribute" 40 | int xar_ext2attr_archive(xar_t x, xar_file_t f, const char* file, const char *buffer, size_t len); 41 | int xar_ext2attr_extract(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len); 42 | #endif /* _XAR_EXT2_H_ */ 43 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/fbsdattr.h: -------------------------------------------------------------------------------- 1 | /* All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions 5 | * are met: 6 | * 1. Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * 2. Redistributions in binary form must reproduce the above copyright 9 | * notice, this list of conditions and the following disclaimer in the 10 | * documentation and/or other materials provided with the distribution. 11 | * 3. Neither the name of Apple nor the names of any contributors 12 | * may be used to endorse or promote products derived from this software 13 | * without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | * POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | /* 28 | * Rob Braun 29 | * 26-Oct-2004 30 | * Copyright (c) 2004 Rob Braun. All rights reserved. 31 | */ 32 | /* 33 | * Portions Copyright 2006, Apple Computer, Inc. 34 | * Christopher Ryan 35 | */ 36 | 37 | #ifndef _XAR_FBSDATTR_H_ 38 | #define _XAR_FBSDATTR_H_ 39 | int32_t xar_fbsdattr_archive(xar_t x, xar_file_t f, const char* file, const char *buffer, size_t len); 40 | int32_t xar_fbsdattr_extract(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len); 41 | #endif /* _XAR_FBSDATTR_H_ */ 42 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/filetree.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_FILETREE_H_ 39 | #define _XAR_FILETREE_H_ 40 | 41 | #ifndef _FILE_OFFSET_BITS 42 | #define _FILE_OFFSET_BITS 64 43 | #endif 44 | 45 | #include 46 | #include 47 | 48 | struct __xar_attr_t { 49 | const char *key; 50 | const char *value; 51 | const char *ns; 52 | const struct __xar_attr_t *next; 53 | }; 54 | typedef const struct __xar_attr_t *xar_attr_t; 55 | 56 | struct __xar_prop_t { 57 | const char *key; 58 | const char *value; 59 | const struct __xar_prop_t *parent; 60 | const struct __xar_prop_t *children; 61 | const struct __xar_prop_t *next; 62 | const struct __xar_attr_t *attrs; 63 | const struct __xar_file_t *file; 64 | const char *prefix; 65 | const char *ns; 66 | }; 67 | typedef const struct __xar_prop_t *xar_prop_t; 68 | 69 | #include "ea.h" 70 | 71 | struct __xar_file_t { 72 | const struct __xar_prop_t *props; 73 | const struct __xar_attr_t *attrs; 74 | const char *prefix; 75 | const char *ns; 76 | const char *fspath; 77 | char parent_extracted; 78 | const struct __xar_file_t *parent; 79 | const struct __xar_file_t *children; 80 | const struct __xar_file_t *next; 81 | xar_ea_t eas; 82 | uint64_t nexteaid; 83 | }; 84 | 85 | #define XAR_ATTR(x) ((struct __xar_attr_t *)(x)) 86 | #define XAR_FILE(x) ((struct __xar_file_t *)(x)) 87 | #define XAR_PROP(x) ((struct __xar_prop_t *)(x)) 88 | 89 | void xar_file_free(xar_file_t f); 90 | xar_attr_t xar_attr_new(void); 91 | int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key, const char *value); 92 | int32_t xar_attr_pset(xar_file_t f, xar_prop_t p, const char *key, const char *value); 93 | const char *xar_attr_get(xar_file_t f, const char *prop, const char *key); 94 | const char *xar_attr_pget(xar_file_t f, xar_prop_t p, const char *key); 95 | void xar_attr_free(xar_attr_t a); 96 | void xar_file_serialize(xar_file_t f, xmlTextWriterPtr writer); 97 | xar_file_t xar_file_unserialize(xar_t x, xar_file_t parent, xmlTextReaderPtr reader); 98 | xar_file_t xar_file_find(xar_file_t f, const char *path); 99 | xar_file_t xar_file_new(xar_file_t f); 100 | xar_file_t xar_file_replicate(xar_file_t original, xar_file_t newparent); 101 | void xar_file_free(xar_file_t f); 102 | 103 | void xar_prop_serialize(xar_prop_t p, xmlTextWriterPtr writer); 104 | int32_t xar_prop_unserialize(xar_file_t f, xar_prop_t parent, xmlTextReaderPtr reader); 105 | void xar_prop_free(xar_prop_t p); 106 | xar_prop_t xar_prop_new(xar_file_t f, xar_prop_t parent); 107 | xar_prop_t xar_prop_pset(xar_file_t f, xar_prop_t p, const char *key, const char *value); 108 | xar_prop_t xar_prop_find(xar_prop_t p, const char *key); 109 | xar_prop_t xar_prop_pget(xar_prop_t p, const char *key); 110 | const char *xar_prop_getkey(xar_prop_t p); 111 | const char *xar_prop_getvalue(xar_prop_t p); 112 | int32_t xar_prop_setkey(xar_prop_t p, const char *key); 113 | int32_t xar_prop_setvalue(xar_prop_t p, const char *value); 114 | xar_prop_t xar_prop_pfirst(xar_file_t f); 115 | xar_prop_t xar_prop_pnext(xar_prop_t p); 116 | void xar_prop_punset(xar_file_t f, xar_prop_t p); 117 | 118 | #endif /* _XAR_FILETREE_H_ */ 119 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_HASH_H_ 39 | #define _XAR_HASH_H_ 40 | 41 | #include "filetree.h" 42 | 43 | int32_t xar_hash_archived(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 44 | int32_t xar_hash_archived_in(xar_t x, xar_file_t f, xar_prop_t p, void *in, size_t inlen, void **context); 45 | 46 | int32_t xar_hash_unarchived(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 47 | int32_t xar_hash_unarchived_out(xar_t x, xar_file_t f, xar_prop_t p, void *in, size_t inlen, void **context); 48 | 49 | int32_t xar_hash_done(xar_t x, xar_file_t f, xar_prop_t p, void **context); 50 | int32_t xar_hash_out_done(xar_t x, xar_file_t f, xar_prop_t p, void **context); 51 | 52 | #endif /* _XAR_HASH_H_ */ 53 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_IO_H_ 39 | #define _XAR_IO_H_ 40 | 41 | typedef int (*read_callback)(xar_t, xar_file_t, void *, size_t, void *context); 42 | typedef int (*write_callback)(xar_t, xar_file_t, void *, size_t, void *context); 43 | 44 | typedef int (*fromheap_in)(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 45 | typedef int (*fromheap_out)(xar_t x, xar_file_t f, xar_prop_t p, void *in, size_t inlen, void **context); 46 | typedef int (*fromheap_done)(xar_t x, xar_file_t f, xar_prop_t p, void **context); 47 | 48 | typedef int (*toheap_in)(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 49 | typedef int (*toheap_out)(xar_t x, xar_file_t f, xar_prop_t p, void *in, size_t inlen, void **context); 50 | typedef int (*toheap_done)(xar_t x, xar_file_t f, xar_prop_t p, void **context); 51 | 52 | struct datamod { 53 | fromheap_in fh_in; 54 | fromheap_out fh_out; 55 | fromheap_done fh_done; 56 | toheap_in th_in; 57 | toheap_out th_out; 58 | toheap_done th_done; 59 | }; 60 | 61 | int32_t xar_attrcopy_to_heap(xar_t x, xar_file_t f, xar_prop_t p, read_callback rcb, void *context); 62 | int32_t xar_attrcopy_from_heap(xar_t x, xar_file_t f, xar_prop_t p, write_callback wcb, void *context); 63 | int32_t xar_attrcopy_from_heap_to_heap(xar_t xsource, xar_file_t fsource, xar_prop_t p, xar_t xdest, xar_file_t fdest); 64 | int32_t xar_heap_to_archive(xar_t x); 65 | 66 | #endif /* _XAR_IO_H_ */ 67 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/linuxattr.h: -------------------------------------------------------------------------------- 1 | /* All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions 5 | * are met: 6 | * 1. Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * 2. Redistributions in binary form must reproduce the above copyright 9 | * notice, this list of conditions and the following disclaimer in the 10 | * documentation and/or other materials provided with the distribution. 11 | * 3. Neither the name of Apple nor the names of any contributors 12 | * may be used to endorse or promote products derived from this software 13 | * without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | * POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | /* 28 | * Rob Braun 29 | * 26-Oct-2004 30 | * Copyright (c) 2004 Rob Braun. All rights reserved. 31 | */ 32 | /* 33 | * Portions Copyright 2006, Apple Computer, Inc. 34 | * Christopher Ryan 35 | */ 36 | 37 | #ifndef _XAR_LINUXATTR_H_ 38 | #define _XAR_LINUXATTR_H_ 39 | int32_t xar_linuxattr_archive(xar_t x, xar_file_t f, const char* file, const char *buffer, size_t len); 40 | int32_t xar_linuxattr_extract(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len); 41 | #endif /* _XAR_LINUXATTR_H_ */ 42 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/macho.h: -------------------------------------------------------------------------------- 1 | /* All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions 5 | * are met: 6 | * 1. Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * 2. Redistributions in binary form must reproduce the above copyright 9 | * notice, this list of conditions and the following disclaimer in the 10 | * documentation and/or other materials provided with the distribution. 11 | * 3. Neither the name of Apple nor the names of any contributors 12 | * may be used to endorse or promote products derived from this software 13 | * without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | * POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | /* 28 | * Portions Copyright 2006, Apple Computer, Inc. 29 | * Christopher Ryan 30 | */ 31 | 32 | #ifndef _MACHO_H_ 33 | #define _MACHO_H_ 34 | 35 | #include "xar.h" 36 | #include "filetree.h" 37 | 38 | struct mach_header { 39 | uint32_t magic; 40 | uint32_t cputype; 41 | uint32_t cpusubtype; 42 | uint32_t filetype; 43 | uint32_t ncmds; 44 | uint32_t sizeofcmds; 45 | uint32_t flags; 46 | }; 47 | 48 | struct lc { 49 | uint32_t cmd; 50 | uint32_t cmdsize; 51 | }; 52 | 53 | struct fat_header { 54 | uint32_t magic; 55 | uint32_t nfat_arch; 56 | }; 57 | 58 | struct fat_arch { 59 | uint32_t cputype; 60 | uint32_t cpusubtype; 61 | uint32_t offset; 62 | uint32_t size; 63 | uint32_t alighn; 64 | }; 65 | 66 | int32_t xar_macho_in(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 67 | int32_t xar_macho_done(xar_t x, xar_file_t f, xar_prop_t p, void **context); 68 | 69 | #endif /* _MACHO_H_ */ 70 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/script.c: -------------------------------------------------------------------------------- 1 | /* 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of Apple nor the names of any contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | /* 29 | * Portions Copyright 2006, Apple Computer, Inc. 30 | * Christopher Ryan 31 | */ 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "config.h" 39 | #ifndef HAVE_ASPRINTF 40 | #include "asprintf.h" 41 | #endif 42 | #include "xar.h" 43 | #include "filetree.h" 44 | 45 | struct _script_context{ 46 | int initted; 47 | }; 48 | 49 | #define SCRIPT_CONTEXT(x) ((struct _script_context*)(*x)) 50 | 51 | int32_t xar_script_in(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context) { 52 | char *buf = *in; 53 | xar_prop_t tmpp; 54 | 55 | if(!SCRIPT_CONTEXT(context)){ 56 | *context = calloc(1,sizeof(struct _script_context)); 57 | } 58 | 59 | if( SCRIPT_CONTEXT(context)->initted ) 60 | return 0; 61 | 62 | /*We only run on the begining of the file, so once we init, we don't run again*/ 63 | SCRIPT_CONTEXT(context)->initted = 1; 64 | 65 | if( (*inlen > 2) && (buf[0] == '#') && (buf[1] == '!') ) { 66 | char *exe; 67 | int i; 68 | 69 | exe = malloc(*inlen); 70 | if( !exe ) 71 | return -1; 72 | memset(exe, 0, *inlen); 73 | 74 | for(i = 2; (i < *inlen) && (buf[i] != '\0') && (buf[i] != '\n') && (buf[i] != ' '); ++i) { 75 | exe[i-2] = buf[i]; 76 | } 77 | 78 | tmpp = xar_prop_pset(f, p, "content", NULL); 79 | if( tmpp ) { 80 | xar_prop_pset(f, tmpp, "type", "script"); 81 | xar_prop_pset(f, tmpp, "interpreter", exe); 82 | } 83 | free(exe); 84 | } 85 | return 0; 86 | } 87 | 88 | int32_t xar_script_done(xar_t x, xar_file_t f, xar_prop_t p, void **context) { 89 | 90 | if(!SCRIPT_CONTEXT(context)){ 91 | return 0; 92 | } 93 | 94 | if( *context ){ 95 | free(*context); 96 | *context = NULL; 97 | } 98 | 99 | return 0; 100 | } 101 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/script.h: -------------------------------------------------------------------------------- 1 | /* 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of Apple nor the names of any contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | /* 29 | * Portions Copyright 2006, Apple Computer, Inc. 30 | * Christopher Ryan 31 | */ 32 | 33 | #ifndef _SCRIPT_H_ 34 | #define _SCRIPT_H_ 35 | 36 | int32_t xar_script_in(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 37 | int32_t xar_script_done(xar_t x, xar_file_t f, xar_prop_t p, void **context); 38 | 39 | #endif /* _SCRIPT_H_ */ 40 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/signature.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006 Apple Computer, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Apple nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 6-July-2006 31 | * DRI: Christopher Ryan 32 | */ 33 | 34 | #ifndef _XAR_SIGNATURE_H_ 35 | #define _XAR_SIGNATURE_H_ 36 | 37 | #include "xar.h" 38 | 39 | struct __xar_x509cert_t{ 40 | uint8_t *content; 41 | int32_t len; 42 | struct __xar_x509cert_t *next; 43 | }; 44 | 45 | struct __xar_signature_t { 46 | char *type; 47 | int32_t len; 48 | off_t offset; 49 | int32_t x509cert_count; 50 | struct __xar_x509cert_t *x509certs; 51 | struct __xar_signature_t *next; 52 | xar_signer_callback signer_callback; /* callback for signing */ 53 | void *callback_context; /* context for callback */ 54 | xar_t x; 55 | }; 56 | 57 | #define XAR_SIGNATURE(x) ((struct __xar_signature_t *)(x)) 58 | 59 | int32_t xar_signature_serialize(xar_signature_t sig, xmlTextWriterPtr writer); 60 | xar_signature_t xar_signature_unserialize(xar_t x, xmlTextReaderPtr reader); 61 | 62 | 63 | /* deallocates the link list of xar signatures */ 64 | void xar_signature_remove(xar_signature_t sig); 65 | 66 | #endif /* _XAR_SIGNATURE_H_ */ 67 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/stat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_STAT_H_ 39 | #define _XAR_STAT_H_ 40 | 41 | #include "xar.h" 42 | 43 | int32_t xar_stat_archive(xar_t x, xar_file_t f, const char *file, const char *buffer, size_t len); 44 | int32_t xar_stat_extract(xar_t x, xar_file_t f, const char *file, char *buffer, size_t len); 45 | int32_t xar_set_perm(xar_t x, xar_file_t f, const char *file, char *buffer, size_t len); 46 | int32_t xar_flags_extract(xar_t x, xar_file_t f, const char *file, char *buffer, size_t len); 47 | 48 | #endif /* _XAR_STAT_H_ */ 49 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/subdoc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | 34 | #ifndef _XAR_SUBDOC_H_ 35 | #define _XAR_SUBDOC_H_ 36 | 37 | #include "xar.h" 38 | #include "filetree.h" 39 | 40 | struct __xar_subdoc_t { 41 | struct __xar_prop_t *props; 42 | struct __xar_attr_t *attrs; 43 | const char *prefix; 44 | const char *ns; 45 | const char *blank1; /* filler for xar_file_t compatibility */ 46 | const char *blank2; /* filler for xar_file_t compatibility */ 47 | const char blank3; /* filler for xar_file_t compatibility */ 48 | const char *name; 49 | struct __xar_subdoc_t *next; 50 | const char *value; /* a subdoc should very rarely have a value */ 51 | xar_t x; 52 | }; 53 | 54 | #define XAR_SUBDOC(x) ((struct __xar_subdoc_t *)(x)) 55 | 56 | void xar_subdoc_unserialize(xar_subdoc_t s, xmlTextReaderPtr reader); 57 | void xar_subdoc_serialize(xar_subdoc_t s, xmlTextWriterPtr writer, int wrap); 58 | void xar_subdoc_free(xar_subdoc_t s); 59 | xar_subdoc_t xar_subdoc_find(xar_t x, const char *name); 60 | 61 | #endif /* _XAR_SUBDOC_H_ */ 62 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/util.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include "config.h" 46 | #ifndef HAVE_ASPRINTF 47 | #include "asprintf.h" 48 | #endif 49 | #include "xar.h" 50 | #include "archive.h" 51 | #include "filetree.h" 52 | 53 | uint64_t xar_ntoh64(uint64_t num) { 54 | int t = 1234; 55 | union conv { 56 | uint64_t i64; 57 | uint32_t i32[2]; 58 | } *in, out; 59 | 60 | if( ntohl(t) == t ) { 61 | out.i64 = num; 62 | return out.i64; 63 | } 64 | in = (union conv *)# 65 | out.i32[1] = ntohl(in->i32[0]); 66 | out.i32[0] = ntohl(in->i32[1]); 67 | return(out.i64); 68 | } 69 | 70 | uint32_t xar_swap32(uint32_t num) { 71 | uint8_t *one, *two; 72 | uint32_t ret; 73 | 74 | two = (uint8_t *)&ret; 75 | one = (uint8_t *)# 76 | two[3] = one[0]; 77 | two[2] = one[1]; 78 | two[1] = one[2]; 79 | two[0] = one[3]; 80 | 81 | return ret; 82 | } 83 | 84 | /* xar_get_path 85 | * Summary: returns the archive path of the file f. 86 | * Caller needs to free the return value. 87 | */ 88 | char *xar_get_path(xar_file_t f) { 89 | char *ret, *tmp; 90 | const char *name; 91 | xar_file_t i; 92 | 93 | xar_prop_get(f, "name", &name); 94 | ret = strdup(name); 95 | for(i = XAR_FILE(f)->parent; i; i = XAR_FILE(i)->parent) { 96 | const char *name; 97 | xar_prop_get(i, "name", &name); 98 | tmp = ret; 99 | asprintf(&ret, "%s/%s", name, tmp); 100 | free(tmp); 101 | } 102 | 103 | return ret; 104 | } 105 | 106 | off_t xar_get_heap_offset(xar_t x) { 107 | return XAR(x)->toc_count + sizeof(xar_header_t); 108 | } 109 | 110 | /* xar_read_fd 111 | * Summary: Reads from a file descriptor a certain number of bytes to a specific 112 | * buffer. This simple wrapper just handles certain retryable error situations. 113 | * Returns -1 when it fails fatally; the number of bytes read otherwise. 114 | */ 115 | ssize_t xar_read_fd( int fd, void * buffer, size_t nbytes ) { 116 | ssize_t rb; 117 | ssize_t off = 0; 118 | 119 | while ( off < nbytes ) { 120 | rb = read(fd, buffer+off, nbytes-off); 121 | if( (rb < 1 ) && (errno != EINTR) && (errno != EAGAIN) ) 122 | return -1; 123 | off += rb; 124 | } 125 | 126 | return off; 127 | } 128 | 129 | /* xar_write_fd 130 | * Summary: Writes from a buffer to a file descriptor. Like xar_read_fd it 131 | * also just handles certain retryable error situations. 132 | * Returs -1 when it fails fatally; the number of bytes written otherwise. 133 | */ 134 | ssize_t xar_write_fd( int fd, void * buffer, size_t nbytes ) { 135 | ssize_t rb; 136 | ssize_t off = 0; 137 | 138 | while ( off < nbytes ) { 139 | rb = write(fd, buffer+off, nbytes-off); 140 | if( (rb < 1 ) && (errno != EINTR) && (errno != EAGAIN) ) 141 | return -1; 142 | off += rb; 143 | } 144 | 145 | return off; 146 | } 147 | 148 | dev_t xar_makedev(uint32_t major, uint32_t minor) 149 | { 150 | #ifdef makedev 151 | return makedev(major, minor); 152 | #else 153 | return (major << 8) | minor; 154 | #endif 155 | } 156 | 157 | void xar_devmake(dev_t dev, uint32_t *out_major, uint32_t *out_minor) 158 | { 159 | #ifdef major 160 | *out_major = major(dev); 161 | #else 162 | *out_major = (dev >> 8) & 0xFF; 163 | #endif 164 | #ifdef minor 165 | *out_minor = minor(dev); 166 | #else 167 | *out_minor = dev & 0xFF; 168 | #endif 169 | return; 170 | } 171 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_UTIL_H_ 39 | #define _XAR_UTIL_H_ 40 | 41 | #include 42 | #include "xar.h" 43 | 44 | 45 | uint64_t xar_ntoh64(uint64_t num); 46 | uint32_t xar_swap32(uint32_t num); 47 | char *xar_get_path(xar_file_t f); 48 | off_t xar_get_heap_offset(xar_t x); 49 | ssize_t xar_read_fd(int fd, void * buffer, size_t nbytes); 50 | ssize_t xar_write_fd(int fd, void * buffer, size_t nbytes); 51 | dev_t xar_makedev(uint32_t major, uint32_t minor); 52 | void xar_devmake(dev_t dev, uint32_t *major, uint32_t *minor); 53 | 54 | #endif /* _XAR_UTIL_H_ */ 55 | -------------------------------------------------------------------------------- /OtherSources/lib/xar/zxar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Rob Braun 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Rob Braun nor the names of his contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /* 30 | * 03-Apr-2005 31 | * DRI: Rob Braun 32 | */ 33 | /* 34 | * Portions Copyright 2006, Apple Computer, Inc. 35 | * Christopher Ryan 36 | */ 37 | 38 | #ifndef _XAR_ZLIB_H_ 39 | #define _XAR_ZLIB_H_ 40 | 41 | int xar_gzip_fromheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 42 | int xar_gzip_fromheap_done(xar_t x, xar_file_t f, xar_prop_t p, void **context); 43 | 44 | int32_t xar_gzip_toheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in, size_t *inlen, void **context); 45 | int xar_gzip_toheap_done(xar_t x, xar_file_t f, xar_prop_t p, void **context); 46 | #endif /* _XAR_ZLIB_H_ */ 47 | -------------------------------------------------------------------------------- /OtherSources/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DocSets 4 | // 5 | // Created by Ole Zorn on 05.12.10. 6 | // Copyright 2010 omz:software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | @autoreleasepool { 14 | int retVal = UIApplicationMain(argc, argv, nil, @"DocSetsAppDelegate"); 15 | return retVal; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #DocSets for iOS 2 | 3 | DocSets for iOS is a dedicated app for reading Apple's developer documentation on an iPad or iPhone. 4 | 5 | It downloads the entire library (iOS and/or Mac), so that it's pretty fast and even works when you have no internet connection. 6 | 7 | License: BSD-2 8 | 9 | Requires iOS 5 10 | 11 | You can follow me on Twitter: [@olemoritz](http://twitter.com/olemoritz) 12 | 13 | Feedback and pull requests are welcome. 14 | 15 | ![DocSets for iOS Screenshot](http://github.com/omz/DocSets-for-iOS/raw/master/Screenshot.png) -------------------------------------------------------------------------------- /Resources/AvailableDocSets.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DocSets 6 | 7 | 8 | title 9 | iOS 5.0 Library 10 | name 11 | com.apple.adc.documentation.AppleiOS5_0.iOSLibrary.docset 12 | URL 13 | http://devimages.apple.com/docsets/20120109/com.apple.adc.documentation.AppleiOS5_0.iOSLibrary.xar 14 | 15 | 16 | title 17 | iOS 4.3 Library 18 | name 19 | com.apple.adc.documentation.AppleiOS4_3.iOSLibrary.docset 20 | URL 21 | http://devimages.apple.com/docsets/20110720/com.apple.adc.documentation.AppleiOS4_3.iOSLibrary.xar 22 | 23 | 24 | title 25 | iOS 4.2 Library 26 | name 27 | com.apple.adc.documentation.AppleiOS4_2.iOSLibrary.Xcode4.docset 28 | URL 29 | http://devimages.apple.com/docsets/20101122/com.apple.adc.documentation.AppleiOS4_2.iOSLibrary.Xcode4.xar 30 | 31 | 32 | title 33 | Mac OS X 10.7 Core Library 34 | name 35 | com.apple.adc.documentation.AppleLion.CoreReference.docset 36 | URL 37 | http://devimages.apple.com/docsets/20120109/com.apple.adc.documentation.AppleLion.CoreReference.xar 38 | 39 | 40 | title 41 | Mac OS X 10.6 Core Library 42 | name 43 | com.apple.adc.documentation.AppleSnowLeopard.CoreReference.docset 44 | URL 45 | http://devimages.apple.com/docsets/20110621/com.apple.adc.documentation.AppleSnowLeopard.CoreReference.xar 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleDocumentTypes 10 | 11 | CFBundleExecutable 12 | ${EXECUTABLE_NAME} 13 | CFBundleIconFile 14 | Icon57.png 15 | CFBundleIconFiles 16 | 17 | Icon57.png 18 | Icon72.png 19 | Icon114.png 20 | 21 | CFBundleIdentifier 22 | com.omz-software.${PRODUCT_NAME:rfc1034identifier} 23 | CFBundleInfoDictionaryVersion 24 | 6.0 25 | CFBundleName 26 | ${PRODUCT_NAME} 27 | CFBundlePackageType 28 | APPL 29 | CFBundleSignature 30 | ???? 31 | CFBundleURLTypes 32 | 33 | CFBundleVersion 34 | 1.0 35 | LSRequiresIPhoneOS 36 | 37 | UIApplicationExitsOnSuspend 38 | 39 | UIFileSharingEnabled 40 | 41 | UIPrerenderedIcon 42 | 43 | UISupportedInterfaceOrientations 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UTExportedTypeDeclarations 51 | 52 | UTImportedTypeDeclarations 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Resources/docSet.mom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Resources/docSet.mom -------------------------------------------------------------------------------- /Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aral/DocSets-for-iOS/cd98285b1fc1928a23a7a68fbcff768b6bae6b2e/Screenshot.png --------------------------------------------------------------------------------