]> WPIA git - cassiopeia.git/blobdiff - src/X509.h
add: Initial code to implement revocation
[cassiopeia.git] / src / X509.h
index dbc6d0a0df470a76a4dceea1691ddce034f85d1f..79aabc1f2333516937f89c786527a79a335bc654 100644 (file)
@@ -6,6 +6,7 @@
 #include <openssl/ssl.h>
 
 #include "database.h"
+#include "sslUtil.h"
 
 class X509Req {
 private:
@@ -15,7 +16,7 @@ private:
     X509Req( X509_REQ* csr );
     X509Req( std::string spkac );
 public:
-    static std::shared_ptr<X509Req> parse( std::string content );
+    static std::shared_ptr<X509Req> parseCSR( std::string content );
     static std::shared_ptr<X509Req> parseSPKAC( std::string content );
     int verify();
     std::shared_ptr<EVP_PKEY> getPkey();
@@ -31,7 +32,7 @@ public:
     void setIssuerNameFrom( std::shared_ptr<X509> ca );
     void setPubkeyFrom( std::shared_ptr<X509Req> r );
     void setSerialNumber( BIGNUM* num );
-    void setExtensions( std::shared_ptr<X509> caCert, std::vector<std::shared_ptr<SAN>>& sans );
+    void setExtensions( std::shared_ptr<X509> caCert, std::vector<std::shared_ptr<SAN>>& sans, Profile& prof );
     void setTimes( uint32_t before, uint32_t after );
     std::shared_ptr<SignedCertificate> sign( std::shared_ptr<EVP_PKEY> caKey, std::string signAlg );
 };