-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathx509.h
More file actions
39 lines (32 loc) · 949 Bytes
/
x509.h
File metadata and controls
39 lines (32 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __x509_h
#define __x509_h
// Include header for addon version, node/v8 inclusions, etc.
#include <addon.h>
#include <node_version.h>
#include <nan.h>
#include <string>
// OpenSSL headers
#include <openssl/asn1.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/x509_vfy.h>
#include <openssl/bn.h>
using namespace v8;
NAN_METHOD(get_altnames);
NAN_METHOD(get_subject);
NAN_METHOD(get_issuer);
NAN_METHOD(parse_cert);
NAN_METHOD(verify);
NAN_METHOD(verifyFromStr);
Local<Value> try_parse(const std::string& dataString);
Local<Value> verify(const std::string& dataString);
Local<Value> verifyFromStr(const std::string& dataString);
Local<Value> parse_date(ASN1_TIME *date);
Local<Value> parse_serial(ASN1_INTEGER *serial);
Local<Object> parse_name(X509_NAME *subject);
char* real_name(char *data);
char* trim(char *data, int len);
#endif