projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add utility to create stores
[folly.git]
/
folly
/
ssl
/
OpenSSLCertUtils.h
diff --git
a/folly/ssl/OpenSSLCertUtils.h
b/folly/ssl/OpenSSLCertUtils.h
index 31273d02ae797814d643ad0ca99b6802bf0ebd6b..edf3498c66e67eb1740a10b3d9ced26d16c3fbfd 100644
(file)
--- a/
folly/ssl/OpenSSLCertUtils.h
+++ b/
folly/ssl/OpenSSLCertUtils.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2017
-present
Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-90,6
+90,12
@@
class OpenSSLCertUtils {
static std::array<uint8_t, SHA_DIGEST_LENGTH> getDigestSha1(X509& x509);
static std::array<uint8_t, SHA256_DIGEST_LENGTH> getDigestSha256(X509& x509);
static std::array<uint8_t, SHA_DIGEST_LENGTH> getDigestSha1(X509& x509);
static std::array<uint8_t, SHA256_DIGEST_LENGTH> getDigestSha256(X509& x509);
+ /**
+ * Reads a store from a file (or buffer). Throws on error.
+ */
+ static X509StoreUniquePtr readStoreFromFile(std::string caFile);
+ static X509StoreUniquePtr readStoreFromBuffer(ByteRange);
+
private:
static std::string getDateTimeStr(const ASN1_TIME* time);
};
private:
static std::string getDateTimeStr(const ASN1_TIME* time);
};