summaryrefslogtreecommitdiff
path: root/Cryptlib/Include/openssl/srp.h
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2016-09-21 20:29:42 -0400
committerMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2016-09-21 20:29:42 -0400
commit62f0afa2ecead02b1258dabab8097ca278a22f8f (patch)
tree56132d617fff7c4f05e67024ec872d88fcafa92d /Cryptlib/Include/openssl/srp.h
parentd3819813b8e0a64400ddf3ce033bae7c3f245508 (diff)
downloadefi-boot-shim-62f0afa2ecead02b1258dabab8097ca278a22f8f.tar.gz
efi-boot-shim-62f0afa2ecead02b1258dabab8097ca278a22f8f.zip
Import upstream version 0.9+1474479173.6c180c6
Diffstat (limited to 'Cryptlib/Include/openssl/srp.h')
-rw-r--r--Cryptlib/Include/openssl/srp.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Cryptlib/Include/openssl/srp.h b/Cryptlib/Include/openssl/srp.h
index d072536f..4ed4bfe5 100644
--- a/Cryptlib/Include/openssl/srp.h
+++ b/Cryptlib/Include/openssl/srp.h
@@ -82,16 +82,21 @@ typedef struct SRP_gN_cache_st {
DECLARE_STACK_OF(SRP_gN_cache)
typedef struct SRP_user_pwd_st {
+ /* Owned by us. */
char *id;
BIGNUM *s;
BIGNUM *v;
+ /* Not owned by us. */
const BIGNUM *g;
const BIGNUM *N;
+ /* Owned by us. */
char *info;
} SRP_user_pwd;
DECLARE_STACK_OF(SRP_user_pwd)
+void SRP_user_pwd_free(SRP_user_pwd *user_pwd);
+
typedef struct SRP_VBASE_st {
STACK_OF(SRP_user_pwd) *users_pwd;
STACK_OF(SRP_gN_cache) *gN_cache;
@@ -114,8 +119,15 @@ DECLARE_STACK_OF(SRP_gN)
SRP_VBASE *SRP_VBASE_new(char *seed_key);
int SRP_VBASE_free(SRP_VBASE *vb);
+#ifndef OPENSSL_NO_STDIO
int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);
+#endif
+
+/* This method ignores the configured seed and fails for an unknown user. */
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
+/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/
+SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username);
+
char *SRP_create_verifier(const char *user, const char *pass, char **salt,
char **verifier, const char *N, const char *g);
int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt,