summaryrefslogtreecommitdiff
path: root/main/openssl/crypto/objects/obj_xref.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/openssl/crypto/objects/obj_xref.c')
-rw-r--r--main/openssl/crypto/objects/obj_xref.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/openssl/crypto/objects/obj_xref.c b/main/openssl/crypto/objects/obj_xref.c
index 152eca5c..9f744bce 100644
--- a/main/openssl/crypto/objects/obj_xref.c
+++ b/main/openssl/crypto/objects/obj_xref.c
@@ -110,8 +110,10 @@ int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid)
#endif
if (rv == NULL)
return 0;
- *pdig_nid = rv->hash_id;
- *ppkey_nid = rv->pkey_id;
+ if (pdig_nid)
+ *pdig_nid = rv->hash_id;
+ if (ppkey_nid)
+ *ppkey_nid = rv->pkey_id;
return 1;
}
@@ -144,7 +146,8 @@ int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid)
#endif
if (rv == NULL)
return 0;
- *psignid = (*rv)->sign_id;
+ if (psignid)
+ *psignid = (*rv)->sign_id;
return 1;
}