//
//  CertificateInfo.h
//  InforMobile
//
//  Created by Nookaraju Maddila on 7/14/17.
//  Copyright © 2017 Infor Global Solutions. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <openssl/x509.h>
#import "XCCertificate.h"

@interface CertificateInfo : NSObject
+ (NSString *) getCertificateCommonName:(X509 *)certificateX509;
+ (NSString *) getCertificateIssuerName:(X509 *)certificateX509;
+ (NSDate *) getCertificateExpiryDate:(X509 *)certificateX509;
+ (BOOL) isSecureTrustedConnection:(SecTrustRef )trust;
+ (BOOL) isCertficateCNMatchedWithHostNameOfRequest:(NSURLRequest *) request commonName:(NSString *)commonName;

+(NSDictionary *) getCertificateFieldsForCertificateData:(NSData *) certData;
+ (XCCertificate *) getXCCertificateFromCertData:(NSData *)certificateData;
@end
